박유빈

add README

Showing 109 changed files with 5008 additions and 0 deletions
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
# Web related
lib/generated_plugin_registrant.dart
# Symbolication related
app.*.symbols
# Obfuscation related
app.*.map.json
# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.
version:
revision: 18116933e77adc82f80866c928266a5b4f1ed645
channel: stable
project_type: app
<!-- ABOUT THE PROJECT -->
## About The Project
이 프로젝트는 누군가의 창작물을 언어장벽 없이 감상하고 공유하고자 하는 웹서비스 입니다.
우리는 도구로 언어를 사용하고 있습니다. 때로는 그것이 다른 사람과 달라 정보, 마음 등이 전달되지 않을 때가 많습니다.
세계 장벽이 허물어지고 인터넷으로 소통이 가능한 사람들이 가끔은 다른 언어 때문에 다양한 생각과 정보를 얻기 어렵습니다.
이 프로젝트는 이 어려움을 깨고자 시작했습니다.
누군가의 글을 보고 영감을 얻어 여러 언어로 바꿔나가고 공유하며 다양한 시각을 가질 수 있습니다.
<p align="right">(<a href="#top">back to top</a>)</p>
## Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
For help getting started with Flutter, view our
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.
### Built With
server use Node.js, Koa.js and frotend use flutter(Dart)
* [Node.js](https://nodejs.org/)
* [Koa.js](https://koajs.com/)
* [flutter](https://flutter.dev/)
<p align="right">(<a href="#top">back to top</a>)</p>
<!-- GETTING STARTED -->
## Getting Started
Go to the Server [Project folder](http://khuhub.khu.ac.kr/2018102946/likeBack), and git clone.
And go the Frontend [Project folder](http://khuhub.khu.ac.kr/2018102946/likefront)and git clone.
### Installation
(flutter web) [https://docs.flutter.dev/get-started/web]
Requirements
To create a Flutter app with web support, you need the following software:
Flutter SDK. See the [Flutter SDK](https://docs.flutter.dev/get-started/install) installation instructions.
[Chrome](https://www.google.com/chrome/); debugging a web app requires the Chrome browser.
Optional: An IDE that supports Flutter. You can install [Android Studio](https://developer.android.com/studio), IntelliJ IDEA, or Visual Studio Code and [install the Flutter and Dart plugins](https://docs.flutter.dev/get-started/editor) to enable language support and tools for refactoring, running, debugging, and reloading your web app within an editor. See setting up an editor for more details.
For more information, see the web FAQ.
1. Clone the repo
```sh
git clone http://khuhub.khu.ac.kr/2018102946/likefront.git
```
2. Install NPM packages
```sh
cd like
```
3. Run with chorme
```sh
flutter run -d chrome
```
*Build web
```sh
flutter build web
```
<p align="right">(<a href="#top">back to top</a>)</p>
\ No newline at end of file
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 30
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.like"
minSdkVersion 16
targetSdkVersion 30
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.like">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.like">
<application
android:label="like"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<!-- Displays an Android View that continues showing the launch screen
Drawable until Flutter paints its first frame, then this splash
screen fades out. A splash screen is useful to avoid any visual
gap between the end of Android's launch screen and the painting of
Flutter's first frame. -->
<meta-data
android:name="io.flutter.embedding.android.SplashScreenDrawable"
android:resource="@drawable/launch_background"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
</manifest>
package com.example.like
import io.flutter.embedding.android.FlutterActivity
class MainActivity: FlutterActivity() {
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
Flutter draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.like">
<!-- Flutter needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
No preview for this file type
No preview for this file type
**/dgph
*.mode1v3
*.mode2v3
*.moved-aside
*.pbxuser
*.perspectivev3
**/*sync/
.sconsign.dblite
.tags*
**/.vagrant/
**/DerivedData/
Icon?
**/Pods/
**/.symlinks/
profile
xcuserdata
**/.generated/
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Flutter.podspec
Flutter/Generated.xcconfig
Flutter/ephemeral/
Flutter/app.flx
Flutter/app.zip
Flutter/flutter_assets/
Flutter/flutter_export_environment.sh
ServiceDefinitions.json
Runner/GeneratedPluginRegistrant.*
# Exceptions to above rules.
!default.mode1v3
!default.mode2v3
!default.pbxuser
!default.perspectivev3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
</dict>
</plist>
#include "Generated.xcconfig"
#include "Generated.xcconfig"
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
productName = Runner;
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 1100;
};
};
};
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 97C146E51CF9000F007C117D;
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C146FB1CF9000F007C117D /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Profile;
};
249021D4217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.example.like;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
97C147031CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
97C147041CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
97C147061CF9000F007C117D /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.example.like;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.example.like;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
import UIKit
import Flutter
@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
}
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-App-20x20@3x.png",
"scale" : "3x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-App-29x29@3x.png",
"scale" : "3x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-App-40x40@3x.png",
"scale" : "3x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@2x.png",
"scale" : "2x"
},
{
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-App-60x60@3x.png",
"scale" : "3x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@1x.png",
"scale" : "1x"
},
{
"size" : "20x20",
"idiom" : "ipad",
"filename" : "Icon-App-20x20@2x.png",
"scale" : "2x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@1x.png",
"scale" : "1x"
},
{
"size" : "29x29",
"idiom" : "ipad",
"filename" : "Icon-App-29x29@2x.png",
"scale" : "2x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@1x.png",
"scale" : "1x"
},
{
"size" : "40x40",
"idiom" : "ipad",
"filename" : "Icon-App-40x40@2x.png",
"scale" : "2x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@1x.png",
"scale" : "1x"
},
{
"size" : "76x76",
"idiom" : "ipad",
"filename" : "Icon-App-76x76@2x.png",
"scale" : "2x"
},
{
"size" : "83.5x83.5",
"idiom" : "ipad",
"filename" : "Icon-App-83.5x83.5@2x.png",
"scale" : "2x"
},
{
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "Icon-App-1024x1024@1x.png",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
# Launch Screen Assets
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="168" height="185"/>
</resources>
</document>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>like</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
#import "GeneratedPluginRegistrant.h"
import 'package:dio/dio.dart';
import 'package:dio_cookie_manager/dio_cookie_manager.dart';
import 'package:cookie_jar/cookie_jar.dart';
//network
var cookieJar = CookieJar();
var dio = Dio()
..options.baseUrl = "http://172.18.5.174:3000/"
..interceptors.add(CookieManager(cookieJar))
..options.receiveTimeout = 15000
..options.connectTimeout = 15000;
var strapiAddress = "http://172.18.5.174:3000/";
\ No newline at end of file
import 'package:flutter/material.dart';
import 'package:like/screens/home_page.dart';
import 'package:like/screens/login/login.dart';
import 'package:like/screens/login/signup.dart';
import 'package:like/env.dart';
void main() {
runApp(TC());
}
/*
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
*/
class TC extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'like Project',
initialRoute: '/login',
debugShowCheckedModeBanner: false,
routes: {
'/': (context) => HomePage(),
'/login': (context) => LoginPage(),
'/signup' :(context) => SignupPage(),
},
);
}
}
/*
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: const MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that something has
// changed in this State, which causes it to rerun the build method below
// so that the display can reflect the updated values. If we changed
// _counter without calling setState(), then the build method would not be
// called again, and so nothing would appear to happen.
_counter++;
});
}
@override
Widget build(BuildContext context) {
// This method is rerun every time setState is called, for instance as done
// by the _incrementCounter method above.
//
// The Flutter framework has been optimized to make rerunning build methods
// fast, so that you can just rebuild anything that needs updating rather
// than having to individually change instances of widgets.
return Scaffold(
appBar: AppBar(
// Here we take the value from the MyHomePage object that was created by
// the App.build method, and use it to set our appbar title.
title: Text(widget.title),
),
body: Center(
// Center is a layout widget. It takes a single child and positions it
// in the middle of the parent.
child: Column(
// Column is also a layout widget. It takes a list of children and
// arranges them vertically. By default, it sizes itself to fit its
// children horizontally, and tries to be as tall as its parent.
//
// Invoke "debug painting" (press "p" in the console, choose the
// "Toggle Debug Paint" action from the Flutter Inspector in Android
// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
// to see the wireframe for each widget.
//
// Column has various properties to control how it sizes itself and
// how it positions its children. Here we use mainAxisAlignment to
// center the children vertically; the main axis here is the vertical
// axis because Columns are vertical (the cross axis would be
// horizontal).
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
const Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.headline4,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: const Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
*/
\ No newline at end of file
File mode changed
File mode changed
import 'dart:core';
import 'package:flutter/material.dart';
import 'dart:convert';
User userFromJson(String str) => User.fromJson(json.decode(str));
String userToJson(User data) => json.encode(data.toJson());
class User {
String email;
String password;
String phone;
String token;
String username;
List<String> books;
List<String> favorite;
User(
this.email,
this.password,
this.phone,
this.token,
this.username,
this.books,
this.favorite
);
User.fromJson(Map<String, dynamic> json)
:
token = json["token"],
email=json["email"],
password= json["password"],
phone=json["phone"],
username= json["username"],
books=List<String>.from(json["books"].map((x) => x)),
favorite= List<String>.from(json["favorite"].map((x) => x));
Map<String, dynamic> toJson() => {
"email": email,
"password": password,
"phone": phone,
"username": username,
"books": List<dynamic>.from(books.map((x) => x)),
"favorite": List<dynamic>.from(favorite.map((x) => x))
};
void update(var user) {
// String username, List<String> address, String phone,
// List<String> pets, List<String> favorites
this.email = user["email"] ?? this.email;
this.username = user["nickname"] ?? this.username;
//수정필요
this.phone = user["phone"] ?? this.phone;
// this._pets =
// user["pets"] == null ? this._pets : List<String>.from(user["pets"]);
this.books = (user["books"] == null)
? this.books
: List<String>.from(user["books"]);
this.favorite = (user["favorite"] == null)
? this.favorite
: List<String>.from(user["favorite"]);
print("user update");
//notifyListeners();
}
}
//user provider
//pets provider
/*
class User with ChangeNotifier {
String _email;
String get email => _email;
set email(String email) => _email = email;
String _username;
String get username => _username;
set username(String username) => _username = username;
String _phone;
String get phone => _phone;
set phone(String phone) => _phone = phone;
List<String> _books = List<String>(5);
List<String> get _books => _pets;
List<String> _favorite = List<String>();
List<String> get favorite => _favorites;
void updatefavorite(String contentsID){
this._favorite.add(contentsID);
}
void deletefavorite(String contentsID){
this._favorite.remove(contentsID);
}
void update(var user) {
// String username, List<String> address, String phone,
// List<String> pets, List<String> favorites
this._email = user["email"] ?? this._email;
this._username = user["nickname"] ?? this._username;
//수정필요
this._phone = user["phone"] ?? this._phone;
// this._pets =
// user["pets"] == null ? this._pets : List<String>.from(user["pets"]);
this._books = (user["books"] == null)
? this._books
: List<String>.from(user["books"]);
this._favorite = (user["favorite"] == null)
? this._favorite
: List<String>.from(user["favorite"]);
print("user update");
//notifyListeners();
}
}*/
\ No newline at end of file
import 'package:like/widgets/bottom_bar.dart';
import 'package:like/widgets/carousel.dart';
import 'package:like/widgets/destination_heading.dart';
import 'package:like/widgets/explore_drawer.dart';
import 'package:like/widgets/featured_heading.dart';
import 'package:like/widgets/featured_tiles.dart';
import 'package:like/widgets/floating_quick_access_bar.dart';
import 'package:like/widgets/responsive.dart';
import 'package:like/widgets/top_bar_contents.dart';
import 'package:flutter/material.dart';
class HomePage extends StatefulWidget {
@override
_HomePageState createState() => _HomePageState();
}
class _HomePageState extends State<HomePage> {
final ScrollController _scrollController = ScrollController();
double _scrollPosition = 0;
double _opacity = 0;
_scrollListener() {
setState(() {
_scrollPosition = _scrollController.position.pixels;
});
}
@override
void initState() {
_scrollController.addListener(_scrollListener);
super.initState();
}
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
_opacity = _scrollPosition < screenSize.height * 0.40
? _scrollPosition / (screenSize.height * 0.40)
: 1;
return Scaffold(
extendBodyBehindAppBar: true,
appBar: ResponsiveWidget.isSmallScreen(context)
? AppBar(
backgroundColor: Colors.blueGrey.shade900.withOpacity(_opacity),
elevation: 0,
title: Text(
'EXPLORE',
style: TextStyle(
color: Colors.blueGrey.shade100,
fontSize: 20,
fontFamily: 'Montserrat',
fontWeight: FontWeight.w400,
letterSpacing: 3,
),
),
)
: PreferredSize(
preferredSize: Size(screenSize.width, 1000),
child: TopBarContents(_opacity),
),
drawer: ExploreDrawer(),
body: SingleChildScrollView(
controller: _scrollController,
physics: ClampingScrollPhysics(),
child: Column(
children: [
Stack(
children: [
Container(
child: SizedBox(
height: screenSize.height * 0.45,
width: screenSize.width,
child: Image.asset(
'assets/images/cover.jpg',
fit: BoxFit.cover,
),
),
),
Column(
children: [
FloatingQuickAccessBar(screenSize: screenSize),
Container(
child: Column(
children: [
FeaturedHeading(
screenSize: screenSize,
),
FeaturedTiles(screenSize: screenSize)
],
),
),
],
)
],
),
DestinationHeading(screenSize: screenSize),
DestinationCarousel(),
SizedBox(height: screenSize.height / 10),
BottomBar(),
],
),
),
);
}
}
\ No newline at end of file
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class LoginPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _LoginPageState();
}
}
class _LoginPageState extends State<LoginPage> {
@override
void initState() {
SystemChrome.setEnabledSystemUIOverlays([]);
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: ListView(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height/3.5,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0xff6bceff),
Color(0xff6bceff)
],
),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(90)
)
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Spacer(),
Align(
alignment: Alignment.center,
child: Icon(Icons.person,
size: 90,
color: Colors.white,
),
),
Spacer(),
Align(
alignment: Alignment.bottomRight,
child: Padding(
padding: const EdgeInsets.only(
bottom: 32,
right: 32
),
child: Text('Login',
style: TextStyle(
color: Colors.white,
fontSize: 18
),
),
),
),
],
),
),
Container(
height: MediaQuery.of(context).size.height/2,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.only(top: 62),
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width/1.2,
height: 45,
padding: EdgeInsets.only(
top: 4,left: 16, right: 16, bottom: 4
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(50)
),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black12,
blurRadius: 5
)
]
),
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
icon: Icon(Icons.person,
color: Color(0xff6bceff),
),
hintText: 'Username',
),
),
),
Container(
width: MediaQuery.of(context).size.width/1.2,
height: 45,
margin: EdgeInsets.only(top: 32),
padding: EdgeInsets.only(
top: 4,left: 16, right: 16, bottom: 4
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(50)
),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black12,
blurRadius: 5
)
]
),
child: TextField(
obscureText: true,
decoration: InputDecoration(
border: InputBorder.none,
icon: Icon(Icons.vpn_key,
color: Color(0xff6bceff),
),
hintText: 'Password',
),
),
),
Align(
alignment: Alignment.centerRight,
child: Padding(
padding: const EdgeInsets.only(
top: 16, right: 32
),
child: Text('Forgot Password ?',
style: TextStyle(
color: Colors.grey
),
),
),
),
Spacer(),
InkWell(
onTap: (){
Navigator.pushNamed(context, '/');
},
child: Container(
height: 45,
width: MediaQuery.of(context).size.width/1.2,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Color(0xff6bceff),
Color(0xFF00abff),
],
),
borderRadius: BorderRadius.all(
Radius.circular(50)
)
),
child: Center(
child: Text('Login'.toUpperCase(),
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold
),
),
),
),
),
],
),
),
SizedBox(
height: 50,
),
InkWell(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text("Dnon't have an account ?"),
Text("Sign Up",style: TextStyle(color: Color(0xff6bceff)),),
],
),
onTap: (){
Navigator.pushNamed(context, '/signup');
},
),
],
),
),
);
}
}
\ No newline at end of file
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class SignupPage extends StatefulWidget {
@override
_SignupPageState createState() => _SignupPageState();
}
class _SignupPageState extends State<SignupPage> {
@override
void initState() {
SystemChrome.setEnabledSystemUIOverlays([]);
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: ListView(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height/3.5,
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
Color(0xff6bceff),
Color(0xff6bceff)
],
),
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(90)
)
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Spacer(),
Align(
alignment: Alignment.center,
child: Icon(Icons.person,
size: 90,
color: Colors.white,
),
),
Spacer(),
Align(
alignment: Alignment.bottomRight,
child: Padding(
padding: const EdgeInsets.only(
bottom: 32,
right: 32
),
child: Text('Sign Up',
style: TextStyle(
color: Colors.white,
fontSize: 18
),
),
),
),
],
),
),
Container(
height: MediaQuery.of(context).size.height/2,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.only(top: 62),
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width/1.2,
height: 45,
padding: EdgeInsets.only(
top: 4,left: 16, right: 16, bottom: 4
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(50)
),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black12,
blurRadius: 5
)
]
),
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Full Name',
),
),
),
SizedBox(
height: 5,
),
Container(
width: MediaQuery.of(context).size.width/1.2,
height: 45,
padding: EdgeInsets.only(
top: 4,left: 16, right: 16, bottom: 4
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(50)
),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black12,
blurRadius: 5
)
]
),
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Username',
),
),
),
SizedBox(
height: 5,
),
Container(
width: MediaQuery.of(context).size.width/1.2,
height: 45,
padding: EdgeInsets.only(
top: 4,left: 16, right: 16, bottom: 4
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(50)
),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black12,
blurRadius: 5
)
]
),
child: TextField(
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Email',
),
),
),
SizedBox(
height: 5,
),
Container(
width: MediaQuery.of(context).size.width/1.2,
height: 45,
padding: EdgeInsets.only(
top: 4,left: 16, right: 16, bottom: 4
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(50)
),
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black12,
blurRadius: 5
)
]
),
child: TextField(
obscureText: true,
decoration: InputDecoration(
border: InputBorder.none,
hintText: 'Password',
),
),
),
SizedBox(
height: 15,
),
InkWell(
onTap: (){
Navigator.pushNamed(context, '/');
},
child: Container(
height: 45,
width: MediaQuery.of(context).size.width/1.2,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Color(0xff6bceff),
Color(0xFF00abff),
],
),
borderRadius: BorderRadius.all(
Radius.circular(50)
)
),
child: Center(
child: Text('Sign Up'.toUpperCase(),
style: TextStyle(
color: Colors.white,
fontWeight: FontWeight.bold
),
),
),
),
),
],
),
),
InkWell(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text("Have an account ?"),
Text("Login",style: TextStyle(color: Color(0xff6bceff)),),
],
),
onTap: (){
Navigator.pop(context);
},
),
],
),
),
);
}
}
\ No newline at end of file
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:google_sign_in/google_sign_in.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter/foundation.dart' show kIsWeb;
final FirebaseAuth _auth = FirebaseAuth.instance;
final GoogleSignIn googleSignIn = GoogleSignIn();
String? uid;
String? name;
String? userEmail;
String? imageUrl;
/// For checking if the user is already signed into the
/// app using Google Sign In
Future getUser() async {
await Firebase.initializeApp();
SharedPreferences prefs = await SharedPreferences.getInstance();
bool authSignedIn = prefs.getBool('auth') ?? false;
final User? user = _auth.currentUser;
if (authSignedIn == true) {
if (user != null) {
uid = user.uid;
name = user.displayName;
userEmail = user.email;
imageUrl = user.photoURL;
}
}
}
/// For authenticating user using Google Sign In
/// with Firebase Authentication API.
///
/// Retrieves some general user related information
/// from their Google account for ease of the login process
Future<User?> signInWithGoogle() async {
await Firebase.initializeApp();
User? user;
if (kIsWeb) {
GoogleAuthProvider authProvider = GoogleAuthProvider();
try {
final UserCredential userCredential =
await _auth.signInWithPopup(authProvider);
user = userCredential.user;
} catch (e) {
print(e);
}
} else {
final GoogleSignIn googleSignIn = GoogleSignIn();
final GoogleSignInAccount? googleSignInAccount =
await googleSignIn.signIn();
if (googleSignInAccount != null) {
final GoogleSignInAuthentication googleSignInAuthentication =
await googleSignInAccount.authentication;
final AuthCredential credential = GoogleAuthProvider.credential(
accessToken: googleSignInAuthentication.accessToken,
idToken: googleSignInAuthentication.idToken,
);
try {
final UserCredential userCredential =
await _auth.signInWithCredential(credential);
user = userCredential.user;
} on FirebaseAuthException catch (e) {
if (e.code == 'account-exists-with-different-credential') {
print('The account already exists with a different credential.');
} else if (e.code == 'invalid-credential') {
print('Error occurred while accessing credentials. Try again.');
}
} catch (e) {
print(e);
}
}
}
if (user != null) {
uid = user.uid;
name = user.displayName;
userEmail = user.email;
imageUrl = user.photoURL;
SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.setBool('auth', true);
}
return user;
}
Future<User?> registerWithEmailPassword(String email, String password) async {
await Firebase.initializeApp();
User? user;
try {
UserCredential userCredential = await _auth.createUserWithEmailAndPassword(
email: email,
password: password,
);
user = userCredential.user;
if (user != null) {
uid = user.uid;
userEmail = user.email;
}
} on FirebaseAuthException catch (e) {
if (e.code == 'weak-password') {
print('The password provided is too weak.');
} else if (e.code == 'email-already-in-use') {
print('The account already exists for that email.');
}
} catch (e) {
print(e);
}
return user;
}
Future<User?> signInWithEmailPassword(String email, String password) async {
await Firebase.initializeApp();
User? user;
try {
UserCredential userCredential = await _auth.signInWithEmailAndPassword(
email: email,
password: password,
);
user = userCredential.user;
if (user != null) {
uid = user.uid;
userEmail = user.email;
SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.setBool('auth', true);
}
} on FirebaseAuthException catch (e) {
if (e.code == 'user-not-found') {
print('No user found for that email.');
} else if (e.code == 'wrong-password') {
print('Wrong password provided.');
}
}
return user;
}
Future<String> signOut() async {
await _auth.signOut();
SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.setBool('auth', false);
uid = null;
userEmail = null;
return 'User signed out';
}
/// For signing out of their Google account
void signOutGoogle() async {
await googleSignIn.signOut();
await _auth.signOut();
SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.setBool('auth', false);
uid = null;
name = null;
userEmail = null;
imageUrl = null;
print("User signed out of Google account");
}
import 'package:flutter/material.dart';
var lightThemeData = ThemeData(
primarySwatch: Colors.blueGrey,
backgroundColor: Colors.white,
cardColor: Colors.blueGrey[50],
primaryTextTheme: TextTheme(
button: TextStyle(
color: Colors.blueGrey,
decorationColor: Colors.blueGrey[300],
),
subtitle2: TextStyle(
color: Colors.blueGrey[900],
),
subtitle1: TextStyle(
color: Colors.black,
),
headline1: TextStyle(color: Colors.blueGrey[800]),
),
bottomAppBarColor: Colors.blueGrey[900],
iconTheme: IconThemeData(color: Colors.blueGrey),
brightness: Brightness.light,
);
var darkThemeData = ThemeData(
primarySwatch: Colors.blueGrey,
backgroundColor: Colors.blueGrey[900],
cardColor: Colors.black,
primaryTextTheme: TextTheme(
button: TextStyle(
color: Colors.blueGrey[200],
decorationColor: Colors.blueGrey[50],
),
subtitle2: TextStyle(
color: Colors.white,
),
subtitle1: TextStyle(
color: Colors.blueGrey[300],
),
headline1: TextStyle(
color: Colors.white70,
),
),
bottomAppBarColor: Colors.black,
iconTheme: IconThemeData(color: Colors.blueGrey[200]),
brightness: Brightness.dark,
);
import 'package:like/screens/home_page.dart';
//import 'package:like/utils/authentication.dart';
import 'package:flutter/material.dart';
import 'google_sign_in_button.dart';
import 'dart:convert';
import 'dart:typed_data';
import 'package:cookie_jar/cookie_jar.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:like/models/user.dart';
import 'package:provider/provider.dart';
import '../../env.dart';
class AuthDialog extends StatefulWidget {
@override
_AuthDialogState createState() => _AuthDialogState();
}
class _AuthDialogState extends State<AuthDialog> {
late TextEditingController textControllerEmail;
late FocusNode textFocusNodeEmail;
bool _isEditingEmail = false;
late TextEditingController textControllerPassword;
late FocusNode textFocusNodePassword;
bool _isEditingPassword = false;
bool _isRegistering = false;
bool _isLoggingIn = false;
final _formKey = GlobalKey<FormState>();
String? loginStatus;
Color loginStringColor = Colors.green;
var exist = false;
var validPassword = false;
String? _validateEmail(String value) {
value = value.trim();
if (textControllerEmail.text.isNotEmpty) {
if (value.isEmpty) {
return 'Email can\'t be empty';
} else if (!value.contains(RegExp(
r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+"))) {
return 'Enter a correct email address';
}
}
return null;
}
String? _validatePassword(String value) {
value = value.trim();
if (textControllerEmail.text.isNotEmpty) {
if (value.isEmpty) {
return 'Password can\'t be empty';
} else if (value.length < 6) {
return 'Length of password should be greater than 6';
}
}
return null;
}
@override
void initState() {
textControllerEmail = TextEditingController();
textControllerPassword = TextEditingController();
textControllerEmail.text = '';
textControllerPassword.text = '';
textFocusNodeEmail = FocusNode();
textFocusNodePassword = FocusNode();
super.initState();
}
@override
Widget build(BuildContext context) {
return Dialog(
backgroundColor: Theme.of(context).backgroundColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8.0),
),
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Container(
width: 400,
color: Theme.of(context).backgroundColor,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Center(
child: Text(
'EXPLORE',
style: TextStyle(
color: Theme.of(context).textTheme.headline1!.color,
fontSize: 24,
fontFamily: 'Montserrat',
fontWeight: FontWeight.bold,
letterSpacing: 3,
),
),
),
SizedBox(height: 30),
Padding(
padding: const EdgeInsets.only(
left: 20.0,
bottom: 8,
),
child: Text(
'Email address',
textAlign: TextAlign.left,
style: TextStyle(
color: Theme.of(context).textTheme.subtitle2!.color,
fontSize: 18,
// fontFamily: 'Montserrat',
fontWeight: FontWeight.bold,
// letterSpacing: 3,
),
),
),
Padding(
padding: const EdgeInsets.only(
left: 20.0,
right: 20,
),
child: TextField(
focusNode: textFocusNodeEmail,
keyboardType: TextInputType.emailAddress,
textInputAction: TextInputAction.next,
controller: textControllerEmail,
autofocus: false,
onChanged: (value) {
setState(() {
_isEditingEmail = true;
});
},
onSubmitted: (value) {
textFocusNodeEmail.unfocus();
FocusScope.of(context)
.requestFocus(textFocusNodePassword);
},
style: TextStyle(color: Colors.black),
decoration: InputDecoration(
border: new OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
color: Colors.blueGrey[800]!,
width: 3,
),
),
filled: true,
hintStyle: new TextStyle(
color: Colors.blueGrey[300],
),
hintText: "Email",
fillColor: Colors.white,
errorText: _isEditingEmail
? _validateEmail(textControllerEmail.text)
: null,
errorStyle: TextStyle(
fontSize: 12,
color: Colors.redAccent,
),
),
),
),
SizedBox(height: 20),
Padding(
padding: const EdgeInsets.only(
left: 20.0,
bottom: 8,
),
child: Text(
'Password',
textAlign: TextAlign.left,
style: TextStyle(
color: Theme.of(context).textTheme.subtitle2!.color,
fontSize: 18,
fontWeight: FontWeight.bold,
// letterSpacing: 3,
),
),
),
Padding(
padding: const EdgeInsets.only(
left: 20.0,
right: 20,
),
child: TextField(
focusNode: textFocusNodePassword,
keyboardType: TextInputType.text,
textInputAction: TextInputAction.done,
controller: textControllerPassword,
obscureText: true,
autofocus: false,
onChanged: (value) {
setState(() {
_isEditingPassword = true;
});
},
onSubmitted: (value) {
textFocusNodePassword.unfocus();
FocusScope.of(context)
.requestFocus(textFocusNodePassword);
},
style: TextStyle(color: Colors.black),
decoration: InputDecoration(
border: new OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
borderSide: BorderSide(
color: Colors.blueGrey[800]!,
width: 3,
),
),
filled: true,
hintStyle: new TextStyle(
color: Colors.blueGrey[300],
),
hintText: "Password",
fillColor: Colors.white,
errorText: _isEditingPassword
? _validatePassword(textControllerPassword.text)
: null,
errorStyle: TextStyle(
fontSize: 12,
color: Colors.redAccent,
),
),
),
),
Padding(
padding: const EdgeInsets.all(20.0),
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
Flexible(
flex: 1,
child: Container(
width: double.maxFinite,
child: TextButton(
style: TextButton.styleFrom(
primary: Colors.blueGrey.shade800,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0),
),
),
onPressed: () async {
if(textControllerEmail.text.isEmpty){}
if(textControllerEmail.text.isEmpty){
if (await loginWithlocalAndPostSuccess(textControllerEmail.text, textControllerPassword.text)) {
//cookies test
//로그인 정보 서버로 보내고 확인받고 user model에 저장후 넘기기.
Navigator.of(context).pushNamedAndRemoveUntil(
'/home', (Route<dynamic> route) => false);
}
} else{
print('Error');
}
},
child: Padding(
padding: EdgeInsets.only(
top: 15.0,
bottom: 15.0,
),
child: _isLoggingIn
? SizedBox(
height: 16,
width: 16,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor:
new AlwaysStoppedAnimation<Color>(
Colors.white,
),
),
)
: Text(
'Log in',
style: TextStyle(
fontSize: 14,
color: Colors.white,
),
),
),
),
),
),
SizedBox(width: 20),
Flexible(
flex: 1,
child: Container(
width: double.maxFinite,
child: TextButton(
style: TextButton.styleFrom(
primary: Colors.blueGrey.shade800,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
),
),
onPressed: () async {
setState(() {
_isRegistering = true;
});
setState(() {
_isRegistering = false;
});
},
child: Padding(
padding: EdgeInsets.only(
top: 15.0,
bottom: 15.0,
),
child: _isRegistering
? SizedBox(
height: 16,
width: 16,
child: CircularProgressIndicator(
strokeWidth: 2,
valueColor:
new AlwaysStoppedAnimation<Color>(
Colors.white,
),
),
)
: Text(
'Sign up',
style: TextStyle(
fontSize: 14,
color: Colors.white,
),
),
),
),
),
),
],
),
),
loginStatus != null
? Center(
child: Padding(
padding: const EdgeInsets.only(
bottom: 20.0,
),
child: Text(
loginStatus!,
style: TextStyle(
color: loginStringColor,
fontSize: 14,
// letterSpacing: 3,
),
),
),
)
: Container(),
Padding(
padding: const EdgeInsets.only(
left: 40.0,
right: 40.0,
),
child: Container(
height: 1,
width: double.maxFinite,
color: Colors.blueGrey[200],
),
),
SizedBox(height: 30),
Center(child: GoogleButton()),
SizedBox(height: 30),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'By proceeding, you agree to our Terms of Use and confirm you have read our Privacy Policy.',
maxLines: 2,
style: TextStyle(
color: Theme.of(context).textTheme.subtitle2!.color,
fontSize: 14,
fontWeight: FontWeight.w300,
// letterSpacing: 3,
),
),
),
],
),
),
),
),
);
}
}
processingPet(data) {
List<Uint8List> images = [];
for (int j = 0; j < data['image'].length; j++) {
var temp = new List<int>.from(data['image'][j]['data']);
images.add(Uint8List.fromList(temp));
}
var pet = {
"name": data['name'],
"_id": data['_id'],
"ownerId": data['ownerId'],
"species": data['species'],
"birth": data['birth']?.substring(0, 10),
"weight": data['weight']?.toString(),
"image": images,
"petType": data['petType']
};
return pet;
}
loginWithlocalAndPostSuccess(String id, String password) async {
var response = await dio.post("/api/auth/signin/local",
data: {'email': id, 'password': password});
if (response.statusCode == 200) {
//context.read<User>().update(response.data);
return true;
}
}
\ No newline at end of file
import 'package:like/widgets/bottom_bar_column.dart';
import 'package:like/widgets/info_text.dart';
import 'package:like/widgets/responsive.dart';
import 'package:flutter/material.dart';
class BottomBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
padding: EdgeInsets.all(30),
color: Theme.of(context).bottomAppBarColor,
child: ResponsiveWidget.isSmallScreen(context)
? Column(
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
BottomBarColumn(
heading: 'ABOUT',
s1: 'Contact Us',
s2: 'About Us',
s3: 'Careers',
),
BottomBarColumn(
heading: 'HELP',
s1: 'Payment',
s2: 'Cancellation',
s3: 'FAQ',
),
BottomBarColumn(
heading: 'SOCIAL',
s1: 'Twitter',
s2: 'Facebook',
s3: 'YouTube',
),
],
),
Container(
color: Colors.blueGrey,
width: double.maxFinite,
height: 1,
),
SizedBox(height: 20),
InfoText(
type: 'Email',
text: 'explore@gmail.com',
),
SizedBox(height: 5),
InfoText(
type: 'Address',
text: '128, Trymore Road, Delft, MN - 56124',
),
SizedBox(height: 20),
Container(
color: Colors.blueGrey,
width: double.maxFinite,
height: 1,
),
SizedBox(height: 20),
Text(
'Copyright © 2020 | EXPLORE',
style: TextStyle(
color: Colors.blueGrey[300],
fontSize: 14,
),
),
],
)
: Column(
children: [
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
BottomBarColumn(
heading: 'ABOUT',
s1: 'Contact Us',
s2: 'About Us',
s3: 'Careers',
),
BottomBarColumn(
heading: 'HELP',
s1: 'Payment',
s2: 'Cancellation',
s3: 'FAQ',
),
BottomBarColumn(
heading: 'SOCIAL',
s1: 'Twitter',
s2: 'Facebook',
s3: 'YouTube',
),
Container(
color: Colors.blueGrey,
width: 2,
height: 150,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
InfoText(
type: 'Email',
text: 'explore@gmail.com',
),
SizedBox(height: 5),
InfoText(
type: 'Address',
text: '128, Trymore Road, Delft, MN - 56124',
)
],
),
],
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
color: Colors.blueGrey,
width: double.maxFinite,
height: 1,
),
),
],
),
);
}
}
import 'package:flutter/material.dart';
class BottomBarColumn extends StatelessWidget {
final String heading;
final String s1;
final String s2;
final String s3;
BottomBarColumn({
required this.heading,
required this.s1,
required this.s2,
required this.s3,
});
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(bottom: 20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
heading,
style: TextStyle(
color: Colors.blueGrey[300],
fontSize: 18,
fontWeight: FontWeight.w500,
),
),
SizedBox(
height: 10,
),
Text(
s1,
style: TextStyle(
color: Colors.blueGrey[100],
fontSize: 14,
),
),
SizedBox(height: 5),
Text(
s2,
style: TextStyle(
color: Colors.blueGrey[100],
fontSize: 14,
),
),
SizedBox(height: 5),
Text(
s3,
style: TextStyle(
color: Colors.blueGrey[100],
fontSize: 14,
),
),
],
),
);
}
}
import 'package:carousel_slider/carousel_slider.dart';
import 'package:like/widgets/responsive.dart';
import 'package:flutter/material.dart';
class DestinationCarousel extends StatefulWidget {
@override
_DestinationCarouselState createState() => _DestinationCarouselState();
}
class _DestinationCarouselState extends State<DestinationCarousel> {
final String imagePath = 'assets/images/';
final CarouselController _controller = CarouselController();
List _isHovering = [false, false, false, false, false, false, false];
List _isSelected = [true, false, false, false, false, false, false];
int _current = 0;
final List<String> images = [
'assets/images/asia.jpg',
'assets/images/africa.jpg',
'assets/images/europe.jpg',
'assets/images/south_america.jpg',
'assets/images/australia.jpg',
'assets/images/antarctica.jpg',
];
final List<String> places = [
'ASIA',
'AFRICA',
'EUROPE',
'SOUTH AMERICA',
'AUSTRALIA',
'ANTARCTICA',
];
List<Widget> generateImageTiles(screenSize) {
return images
.map(
(element) => ClipRRect(
borderRadius: BorderRadius.circular(8.0),
child: Image.asset(
element,
fit: BoxFit.cover,
),
),
)
.toList();
}
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
var imageSliders = generateImageTiles(screenSize);
return Stack(
children: [
CarouselSlider(
items: imageSliders,
options: CarouselOptions(
scrollPhysics: ResponsiveWidget.isSmallScreen(context)
? PageScrollPhysics()
: NeverScrollableScrollPhysics(),
enlargeCenterPage: true,
aspectRatio: 18 / 8,
autoPlay: true,
onPageChanged: (index, reason) {
setState(() {
_current = index;
for (int i = 0; i < imageSliders.length; i++) {
if (i == index) {
_isSelected[i] = true;
} else {
_isSelected[i] = false;
}
}
});
}),
carouselController: _controller,
),
AspectRatio(
aspectRatio: 18 / 8,
child: Center(
child: Text(
places[_current],
style: TextStyle(
letterSpacing: 8,
fontFamily: 'Electrolize',
fontSize: screenSize.width / 25,
color: Colors.white,
),
),
),
),
ResponsiveWidget.isSmallScreen(context)
? Container()
: AspectRatio(
aspectRatio: 17 / 8,
child: Center(
heightFactor: 1,
child: Align(
alignment: Alignment.bottomCenter,
child: Padding(
padding: EdgeInsets.only(
left: screenSize.width / 8,
right: screenSize.width / 8,
),
child: Card(
elevation: 5,
child: Padding(
padding: EdgeInsets.only(
top: screenSize.height / 50,
bottom: screenSize.height / 50,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
for (int i = 0; i < places.length; i++)
Column(
mainAxisSize: MainAxisSize.min,
children: [
InkWell(
splashColor: Colors.blueGrey,
hoverColor: Colors.transparent,
onHover: (value) {
setState(() {
value
? _isHovering[i] = true
: _isHovering[i] = false;
});
},
onTap: () {
_controller.animateToPage(i);
},
child: Padding(
padding: EdgeInsets.only(
top: screenSize.height / 80,
bottom: screenSize.height / 90),
child: Text(
places[i],
style: TextStyle(
color: _isHovering[i]
? Theme.of(context)
.primaryTextTheme
.button!
.decorationColor
: Theme.of(context)
.primaryTextTheme
.button!
.decorationColor,
),
),
),
),
Visibility(
maintainSize: true,
maintainAnimation: true,
maintainState: true,
visible: _isSelected[i],
child: AnimatedOpacity(
duration: Duration(milliseconds: 400),
opacity: _isSelected[i] ? 1 : 0,
child: Container(
height: 5,
decoration: BoxDecoration(
color: Colors.blueGrey,
borderRadius: BorderRadius.all(
Radius.circular(10),
),
),
width: screenSize.width / 10,
),
),
)
],
),
],
),
),
),
),
),
),
),
],
);
}
}
import 'package:like/widgets/responsive.dart';
import 'package:flutter/material.dart';
class DestinationHeading extends StatelessWidget {
const DestinationHeading({
Key? key,
required this.screenSize,
}) : super(key: key);
final Size screenSize;
@override
Widget build(BuildContext context) {
return ResponsiveWidget.isSmallScreen(context)
? Container(
padding: EdgeInsets.only(
top: screenSize.height / 20,
bottom: screenSize.height / 20,
),
width: screenSize.width,
// color: Colors.black,
child: Text(
'Destinations diversity',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 24,
fontFamily: 'Montserrat',
fontWeight: FontWeight.bold,
),
),
)
: Container(
padding: EdgeInsets.only(
top: screenSize.height / 10,
bottom: screenSize.height / 15,
),
width: screenSize.width,
// color: Colors.black,
child: Text(
'Destinations diversity',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 40,
fontFamily: 'Montserrat',
fontWeight: FontWeight.bold,
),
),
);
}
}
import 'package:like/screens/home_page.dart';
import 'package:like/utils/authentication.dart';
import 'package:flutter/material.dart';
import 'auth_dialog.dart';
class ExploreDrawer extends StatefulWidget {
const ExploreDrawer({
Key? key,
}) : super(key: key);
@override
_ExploreDrawerState createState() => _ExploreDrawerState();
}
class _ExploreDrawerState extends State<ExploreDrawer> {
bool _isProcessing = false;
@override
Widget build(BuildContext context) {
return Drawer(
child: Container(
color: Theme.of(context).bottomAppBarColor,
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
userEmail == null
? Container(
width: double.maxFinite,
child: TextButton(
// color: Colors.black,
// hoverColor: Colors.blueGrey[800],
// highlightColor: Colors.blueGrey[700],
style: TextButton.styleFrom(
primary: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
),
),
onPressed: () {
showDialog(
context: context,
builder: (context) => AuthDialog(),
);
},
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(15),
// ),
child: Padding(
padding: EdgeInsets.only(
top: 15.0,
bottom: 15.0,
),
child: Text(
'Sign in',
style: TextStyle(
fontSize: 20,
color: Colors.white,
),
),
),
),
)
: Row(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: [
CircleAvatar(
radius: 20,
backgroundImage:
imageUrl != null ? NetworkImage(imageUrl!) : null,
child: imageUrl == null
? Icon(
Icons.account_circle,
size: 40,
)
: Container(),
),
SizedBox(width: 10),
Text(
name ?? userEmail!,
style: TextStyle(
fontSize: 20,
color: Colors.white70,
),
)
],
),
SizedBox(height: 20),
userEmail != null
? Container(
width: double.maxFinite,
child: TextButton(
// color: Colors.black,
// hoverColor: Colors.blueGrey[800],
// highlightColor: Colors.blueGrey[700],
style: TextButton.styleFrom(
primary: Colors.black,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
),
),
onPressed: _isProcessing
? null
: () async {
setState(() {
_isProcessing = true;
});
await signOut().then((result) {
print(result);
Navigator.of(context).pushReplacement(
MaterialPageRoute(
fullscreenDialog: true,
builder: (context) => HomePage(),
),
);
}).catchError((error) {
print('Sign Out Error: $error');
});
setState(() {
_isProcessing = false;
});
},
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(15),
// ),
child: Padding(
padding: EdgeInsets.only(
top: 15.0,
bottom: 15.0,
),
child: _isProcessing
? CircularProgressIndicator()
: Text(
'Sign out',
style: TextStyle(
fontSize: 20,
color: Colors.white,
),
),
),
),
)
: Container(),
userEmail != null ? SizedBox(height: 20) : Container(),
InkWell(
onTap: () {},
child: Text(
'Discover',
style: TextStyle(color: Colors.white, fontSize: 22),
),
),
Padding(
padding: const EdgeInsets.only(top: 5.0, bottom: 5.0),
child: Divider(
color: Colors.blueGrey[400],
thickness: 2,
),
),
InkWell(
onTap: () {},
child: Text(
'Contact Us',
style: TextStyle(color: Colors.white, fontSize: 22),
),
),
Expanded(
child: Align(
alignment: Alignment.bottomCenter,
child: Text(
'Copyright © 2020 | EXPLORE',
style: TextStyle(
color: Colors.blueGrey[300],
fontSize: 14,
),
),
),
)
],
),
),
),
);
}
}
import 'package:like/widgets/responsive.dart';
import 'package:flutter/material.dart';
class FeaturedHeading extends StatelessWidget {
const FeaturedHeading({
Key? key,
required this.screenSize,
}) : super(key: key);
final Size screenSize;
@override
Widget build(BuildContext context) {
return Padding(
padding: EdgeInsets.only(
top: screenSize.height * 0.06,
left: screenSize.width / 15,
right: screenSize.width / 15,
),
child: ResponsiveWidget.isSmallScreen(context)
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Row(),
Text(
'Featured',
style: TextStyle(
fontSize: 24,
fontFamily: 'Montserrat',
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 5),
Text(
'Unique wildlife tours & destinations',
textAlign: TextAlign.end,
style: Theme.of(context).primaryTextTheme.subtitle1,
),
SizedBox(height: 10),
],
)
: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Text(
'Featured',
style: TextStyle(
fontSize: 40,
fontFamily: 'Montserrat',
fontWeight: FontWeight.bold,
),
),
Expanded(
child: Text(
'Unique wildlife tours & destinations',
textAlign: TextAlign.end,
style: Theme.of(context).primaryTextTheme.subtitle1,
),
),
],
),
);
}
}
import 'package:like/widgets/responsive.dart';
import 'package:flutter/material.dart';
class FeaturedTiles extends StatelessWidget {
FeaturedTiles({
Key? key,
required this.screenSize,
}) : super(key: key);
final Size screenSize;
final List<String> assets = [
'assets/images/trekking.jpg',
'assets/images/animals.jpg',
'assets/images/photography.jpeg',
];
final List<String> title = ['Trekking', 'Animals', 'Photography'];
@override
Widget build(BuildContext context) {
return ResponsiveWidget.isSmallScreen(context)
? Padding(
padding: EdgeInsets.only(top: screenSize.height / 50),
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(width: screenSize.width / 15),
...Iterable<int>.generate(assets.length).map(
(int pageIndex) => Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: screenSize.width / 2.5,
width: screenSize.width / 1.5,
child: ClipRRect(
borderRadius: BorderRadius.circular(5.0),
child: Image.asset(
assets[pageIndex],
fit: BoxFit.cover,
),
),
),
Padding(
padding: EdgeInsets.only(
top: screenSize.height / 70,
),
child: Text(
title[pageIndex],
style: TextStyle(
fontSize: 16,
fontFamily: 'Montserrat',
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme
.subtitle1!
.color,
),
),
),
],
),
SizedBox(width: screenSize.width / 15),
],
),
),
],
),
),
)
: Padding(
padding: EdgeInsets.only(
top: screenSize.height * 0.06,
left: screenSize.width / 15,
right: screenSize.width / 15,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
...Iterable<int>.generate(assets.length).map(
(int pageIndex) => Column(
children: [
SizedBox(
height: screenSize.width / 6,
width: screenSize.width / 3.8,
child: ClipRRect(
borderRadius: BorderRadius.circular(5.0),
child: Image.asset(
assets[pageIndex],
fit: BoxFit.cover,
),
),
),
Padding(
padding: EdgeInsets.only(
top: screenSize.height / 70,
),
child: Text(
title[pageIndex],
style: TextStyle(
fontSize: 16,
fontFamily: 'Montserrat',
fontWeight: FontWeight.w500,
color: Theme.of(context)
.primaryTextTheme
.subtitle1!
.color,
),
),
),
],
),
),
],
),
);
}
}
import 'package:like/widgets/responsive.dart';
import 'package:flutter/material.dart';
class FloatingQuickAccessBar extends StatefulWidget {
const FloatingQuickAccessBar({
Key? key,
required this.screenSize,
}) : super(key: key);
final Size screenSize;
@override
_FloatingQuickAccessBarState createState() => _FloatingQuickAccessBarState();
}
class _FloatingQuickAccessBarState extends State<FloatingQuickAccessBar> {
List _isHovering = [false, false, false, false];
List<Widget> rowElements = [];
List<String> items = ['Destination', 'Dates', 'People', 'Experience'];
List<IconData> icons = [
Icons.location_on,
Icons.date_range,
Icons.people,
Icons.wb_sunny
];
List<Widget> generateRowElements() {
rowElements.clear();
for (int i = 0; i < items.length; i++) {
Widget elementTile = InkWell(
splashColor: Colors.transparent,
hoverColor: Colors.transparent,
onHover: (value) {
setState(() {
value ? _isHovering[i] = true : _isHovering[i] = false;
});
},
onTap: () {},
child: Text(
items[i],
style: TextStyle(
color: _isHovering[i]
? Theme.of(context).primaryTextTheme.button!.decorationColor
: Theme.of(context).primaryTextTheme.button!.decorationColor,
),
),
);
Widget spacer = SizedBox(
height: widget.screenSize.height / 20,
child: VerticalDivider(
width: 1,
color: Colors.blueGrey[100],
thickness: 1,
),
);
rowElements.add(elementTile);
if (i < items.length - 1) {
rowElements.add(spacer);
}
}
return rowElements;
}
@override
Widget build(BuildContext context) {
return Center(
heightFactor: 1,
child: Padding(
padding: EdgeInsets.only(
top: widget.screenSize.height * 0.40,
left: ResponsiveWidget.isSmallScreen(context)
? widget.screenSize.width / 12
: widget.screenSize.width / 5,
right: ResponsiveWidget.isSmallScreen(context)
? widget.screenSize.width / 12
: widget.screenSize.width / 5,
),
child: ResponsiveWidget.isSmallScreen(context)
? Column(
children: [
...Iterable<int>.generate(items.length).map(
(int pageIndex) => Padding(
padding:
EdgeInsets.only(top: widget.screenSize.height / 80),
child: Card(
color: Theme.of(context).cardColor,
elevation: 4,
child: Padding(
padding: EdgeInsets.only(
top: widget.screenSize.height / 45,
bottom: widget.screenSize.height / 45,
left: widget.screenSize.width / 20),
child: Row(
children: [
Icon(
icons[pageIndex],
color: Theme.of(context).iconTheme.color,
),
SizedBox(width: widget.screenSize.width / 20),
InkWell(
splashColor: Colors.transparent,
hoverColor: Colors.transparent,
onTap: () {},
child: Text(
items[pageIndex],
style: TextStyle(
color: Theme.of(context)
.primaryTextTheme
.button!
.color,
fontSize: 16),
),
),
],
),
),
),
),
),
],
)
: Card(
elevation: 5,
child: Padding(
padding: EdgeInsets.only(
top: widget.screenSize.height / 50,
bottom: widget.screenSize.height / 50,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: generateRowElements(),
),
),
),
),
);
}
}
import 'package:like/screens/home_page.dart';
//import 'package:like/utils/authentication.dart';
import 'package:flutter/material.dart';
class GoogleButton extends StatefulWidget {
@override
_GoogleButtonState createState() => _GoogleButtonState();
}
class _GoogleButtonState extends State<GoogleButton> {
bool _isProcessing = false;
@override
Widget build(BuildContext context) {
return DecoratedBox(
decoration: ShapeDecoration(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
side: BorderSide(color: Colors.blueGrey, width: 3),
),
color: Colors.white,
),
child: OutlinedButton(
style: OutlinedButton.styleFrom(
primary: Colors.blueGrey.shade100,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
side: BorderSide(color: Colors.blueGrey, width: 3),
),
elevation: 0,
),
onPressed: () async {
setState(() {
_isProcessing = true;
});
/*await signInWithGoogle().then((result) {
print(result);
if (result != null) {
Navigator.of(context).pop();
Navigator.of(context).pushReplacement(
MaterialPageRoute(
fullscreenDialog: true,
builder: (context) => HomePage(),
),
);
}
}).catchError((error) {
print('Registration Error: $error');
});
setState(() {
_isProcessing = false;
});*/
},
child: Padding(
padding: const EdgeInsets.fromLTRB(0, 10, 0, 10),
child: _isProcessing
? CircularProgressIndicator(
valueColor: new AlwaysStoppedAnimation<Color>(
Colors.blueGrey,
),
)
: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Image(
image: AssetImage("assets/images/google_logo.png"),
height: 30.0,
),
Padding(
padding: const EdgeInsets.only(left: 20),
child: Text(
'Continue with Google',
style: TextStyle(
fontSize: 20,
color: Colors.blueGrey,
),
),
)
],
),
),
),
);
}
}
import 'package:flutter/material.dart';
class InfoText extends StatelessWidget {
final String type;
final String text;
InfoText({required this.type, required this.text});
@override
Widget build(BuildContext context) {
return Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'$type: ',
style: TextStyle(
color: Colors.blueGrey[300],
fontSize: 16,
),
),
Flexible(
child: Text(
text,
style: TextStyle(
color: Colors.blueGrey[100],
fontSize: 16,
),
),
)
],
);
}
}
import 'package:flutter/material.dart';
class ResponsiveWidget extends StatelessWidget {
final Widget largeScreen;
final Widget? mediumScreen;
final Widget? smallScreen;
const ResponsiveWidget(
{Key? key,
required this.largeScreen,
this.mediumScreen,
this.smallScreen})
: super(key: key);
static bool isSmallScreen(BuildContext context) {
return MediaQuery.of(context).size.width < 800;
}
static bool isLargeScreen(BuildContext context) {
return MediaQuery.of(context).size.width > 1200;
}
static bool isMediumScreen(BuildContext context) {
return MediaQuery.of(context).size.width >= 800 &&
MediaQuery.of(context).size.width <= 1200;
}
@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
if (constraints.maxWidth > 1200) {
return largeScreen;
} else if (constraints.maxWidth <= 1200 &&
constraints.maxWidth >= 800) {
return mediumScreen ?? largeScreen;
} else {
return smallScreen ?? largeScreen;
}
},
);
}
}
import 'package:easy_dynamic_theme/easy_dynamic_theme.dart';
import 'package:like/screens/home_page.dart';
import 'package:like/utils/authentication.dart';
import 'package:like/widgets/auth_dialog.dart';
import 'package:flutter/material.dart';
class TopBarContents extends StatefulWidget {
final double opacity;
TopBarContents(this.opacity);
@override
_TopBarContentsState createState() => _TopBarContentsState();
}
class _TopBarContentsState extends State<TopBarContents> {
final List _isHovering = [
false,
false,
false,
false,
false,
false,
false,
false
];
bool _isProcessing = false;
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
return PreferredSize(
preferredSize: Size(screenSize.width, 1000),
child: Container(
color: Theme.of(context).bottomAppBarColor.withOpacity(widget.opacity),
child: Padding(
padding: EdgeInsets.all(20),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'EXPLORE',
style: TextStyle(
color: Colors.blueGrey[100],
fontSize: 20,
fontFamily: 'Montserrat',
fontWeight: FontWeight.w400,
letterSpacing: 3,
),
),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(width: screenSize.width / 8),
InkWell(
onHover: (value) {
setState(() {
value
? _isHovering[0] = true
: _isHovering[0] = false;
});
},
onTap: () {},
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Discover',
style: TextStyle(
color: _isHovering[0]
? Colors.blue[200]
: Colors.white,
),
),
SizedBox(height: 5),
Visibility(
maintainAnimation: true,
maintainState: true,
maintainSize: true,
visible: _isHovering[0],
child: Container(
height: 2,
width: 20,
color: Colors.white,
),
)
],
),
),
SizedBox(width: screenSize.width / 20),
InkWell(
onHover: (value) {
setState(() {
value
? _isHovering[1] = true
: _isHovering[1] = false;
});
},
onTap: () {},
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(
'Contact Us',
style: TextStyle(
color: _isHovering[1]
? Colors.blue[200]
: Colors.white,
),
),
SizedBox(height: 5),
Visibility(
maintainAnimation: true,
maintainState: true,
maintainSize: true,
visible: _isHovering[1],
child: Container(
height: 2,
width: 20,
color: Colors.white,
),
)
],
),
),
],
),
),
IconButton(
icon: Icon(Icons.brightness_6),
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
color: Colors.white,
onPressed: () {
EasyDynamicTheme.of(context).changeTheme();
},
),
SizedBox(
width: screenSize.width / 50,
),
InkWell(
onHover: (value) {
setState(() {
value ? _isHovering[3] = true : _isHovering[3] = false;
});
},
onTap: userEmail == null
? () {
showDialog(
context: context,
builder: (context) => AuthDialog(),
);
}
: null,
child: userEmail == null
? Text(
'Sign in',
style: TextStyle(
color: _isHovering[3] ? Colors.white : Colors.white70,
),
)
: Row(
children: [
CircleAvatar(
radius: 15,
backgroundImage: imageUrl != null
? NetworkImage(imageUrl!)
: null,
child: imageUrl == null
? Icon(
Icons.account_circle,
size: 30,
)
: Container(),
),
SizedBox(width: 5),
Text(
name ?? userEmail!,
style: TextStyle(
color: _isHovering[3]
? Colors.white
: Colors.white70,
),
),
SizedBox(width: 10),
TextButton(
style: TextButton.styleFrom(
primary: Colors.blueGrey,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
),
),
onPressed: _isProcessing
? null
: () async {
setState(() {
_isProcessing = true;
});
await signOut().then((result) {
print(result);
Navigator.of(context).pushReplacement(
MaterialPageRoute(
fullscreenDialog: true,
builder: (context) => HomePage(),
),
);
}).catchError((error) {
print('Sign Out Error: $error');
});
setState(() {
_isProcessing = false;
});
},
child: Padding(
padding: EdgeInsets.only(
top: 8.0,
bottom: 8.0,
),
child: _isProcessing
? CircularProgressIndicator()
: Text(
'Sign out',
style: TextStyle(
fontSize: 14,
color: Colors.white,
),
),
),
)
],
),
),
],
),
),
),
);
}
}
import 'dart:async';
import 'package:flutter/material.dart';
class WebScrollbar extends StatefulWidget {
final Widget child;
final ScrollController controller;
final double heightFraction;
final double width;
final Color color;
final Color backgroundColor;
final bool isAlwaysShown;
WebScrollbar({
required this.child,
required this.controller,
this.heightFraction = 0.20,
this.width = 8,
this.color = Colors.black45,
this.backgroundColor = Colors.black12,
this.isAlwaysShown = false,
}) : assert(heightFraction < 1.0 && heightFraction > 0.0);
@override
_WebScrollbarState createState() => _WebScrollbarState();
}
class _WebScrollbarState extends State<WebScrollbar> {
double _scrollPosition = 0;
late bool _isUpdating;
late Timer timer;
_scrollListener() {
setState(() {
_scrollPosition = widget.controller.position.pixels;
});
}
@override
void initState() {
widget.controller.addListener(_scrollListener);
_isUpdating = false;
super.initState();
}
@override
Widget build(BuildContext context) {
var screenSize = MediaQuery.of(context).size;
double _scrollerHeight = screenSize.height * widget.heightFraction;
double _topMargin = widget.controller.hasClients
? ((screenSize.height *
_scrollPosition /
widget.controller.position.maxScrollExtent) -
(_scrollerHeight *
_scrollPosition /
widget.controller.position.maxScrollExtent))
: 0;
return NotificationListener<ScrollNotification>(
onNotification: (notification) {
if (notification.depth == 0) {
if (notification is ScrollUpdateNotification) {
timer.cancel();
setState(() {
_isUpdating = true;
});
} else {
timer = Timer(Duration(seconds: 5), () {
setState(() {
_isUpdating = false;
});
});
}
}
return true;
},
child: Stack(
children: [
widget.child,
AnimatedOpacity(
opacity: widget.isAlwaysShown
? 1
: widget.controller.hasClients
? _isUpdating
? 1
: 0
: 0,
duration: Duration(milliseconds: 300),
child: Container(
alignment: Alignment.centerRight,
height: MediaQuery.of(context).size.height,
width: widget.width + 2,
margin: EdgeInsets.only(
left: MediaQuery.of(context).size.width - widget.width + 2,
),
color: widget.backgroundColor,
child: Align(
alignment: Alignment.topCenter,
child: GestureDetector(
child: Container(
height: _scrollerHeight,
width: widget.width,
margin: EdgeInsets.only(
left: 1.0,
right: 1.0,
top: _topMargin,
),
decoration: BoxDecoration(
color: widget.color,
borderRadius: BorderRadius.all(
Radius.circular(3.0),
),
),
),
onTapCancel: () {
timer = Timer(Duration(seconds: 5), () {
setState(() {
_isUpdating = false;
});
});
},
onTapDown: (details) {
timer.cancel();
setState(() {
_isUpdating = true;
});
},
onVerticalDragUpdate: (dragUpdate) {
widget.controller.position.moveTo(dragUpdate
.globalPosition.dy +
dragUpdate.globalPosition.dy *
(_scrollPosition /
widget.controller.position.maxScrollExtent) -
(_scrollerHeight *
_scrollPosition /
widget.controller.position.maxScrollExtent));
setState(() {
if (dragUpdate.globalPosition.dy >= 0 &&
_scrollPosition <=
widget.controller.position.maxScrollExtent) {
_scrollPosition = dragUpdate.globalPosition.dy +
dragUpdate.globalPosition.dy *
(_scrollPosition /
widget
.controller.position.maxScrollExtent) -
(_scrollerHeight *
_scrollPosition /
widget.controller.position.maxScrollExtent);
}
});
},
),
),
),
),
],
),
);
}
}
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
async:
dependency: transitive
description:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.8.1"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
carousel_slider:
dependency: "direct main"
description:
name: carousel_slider
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.1"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0"
cookie_jar:
dependency: transitive
description:
name: cookie_jar
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1"
cupertino_icons:
dependency: "direct main"
description:
name: cupertino_icons
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
dio:
dependency: "direct main"
description:
name: dio
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.4"
dio_cookie_manager:
dependency: "direct main"
description:
name: dio_cookie_manager
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
easy_dynamic_theme:
dependency: "direct main"
description:
name: easy_dynamic_theme
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
ffi:
dependency: transitive
description:
name: ffi
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.2"
file:
dependency: transitive
description:
name: file
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.2"
firebase_auth:
dependency: "direct main"
description:
name: firebase_auth
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.0"
firebase_auth_platform_interface:
dependency: transitive
description:
name: firebase_auth_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.5"
firebase_auth_web:
dependency: transitive
description:
name: firebase_auth_web
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.1"
firebase_core:
dependency: "direct main"
description:
name: firebase_core
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.2"
firebase_core_platform_interface:
dependency: transitive
description:
name: firebase_core_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.0"
firebase_core_web:
dependency: transitive
description:
name: firebase_core_web
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
flutter:
dependency: "direct main"
description: flutter
source: sdk
version: "0.0.0"
flutter_lints:
dependency: "direct dev"
description:
name: flutter_lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.4"
flutter_test:
dependency: "direct dev"
description: flutter
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
google_sign_in:
dependency: "direct main"
description:
name: google_sign_in
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.1"
google_sign_in_platform_interface:
dependency: transitive
description:
name: google_sign_in_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
google_sign_in_web:
dependency: transitive
description:
name: google_sign_in_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.0+3"
http_parser:
dependency: transitive
description:
name: http_parser
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
intl:
dependency: transitive
description:
name: intl
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.0"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
json_annotation:
dependency: "direct main"
description:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "4.4.0"
lints:
dependency: transitive
description:
name: lints
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.0"
nested:
dependency: transitive
description:
name: nested
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
platform:
dependency: transitive
description:
name: platform
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
process:
dependency: transitive
description:
name: process
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.4"
provider:
dependency: "direct main"
description:
name: provider
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.1"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.1+1"
shared_preferences:
dependency: transitive
description:
name: shared_preferences
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.9"
shared_preferences_android:
dependency: transitive
description:
name: shared_preferences_android
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.9"
shared_preferences_ios:
dependency: transitive
description:
name: shared_preferences_ios
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.8"
shared_preferences_linux:
dependency: transitive
description:
name: shared_preferences_linux
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
shared_preferences_macos:
dependency: transitive
description:
name: shared_preferences_macos
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
shared_preferences_platform_interface:
dependency: transitive
description:
name: shared_preferences_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
shared_preferences_web:
dependency: transitive
description:
name: shared_preferences_web
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
shared_preferences_windows:
dependency: transitive
description:
name: shared_preferences_windows
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.3"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_span:
dependency: transitive
description:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.2"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
win32:
dependency: transitive
description:
name: win32
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.1"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0"
sdks:
dart: ">=2.14.0 <3.0.0"
flutter: ">=2.5.0"
name: like
description: A new Flutter project.
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
provider: ^6.0.0
cupertino_icons: ^1.0.2
dio: ^4.0.4
dio_cookie_manager: ^2.0.0
carousel_slider: ^4.0.0-nullsafety.0
easy_dynamic_theme: ^2.2.0
google_sign_in: ^5.2.1
firebase_core: ^1.10.2
firebase_auth: ^3.3.0
json_annotation: ^4.4.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
flutter:
uses-material-design: true
fonts:
- family: Montserrat
fonts:
- asset: fonts/Montserrat-Regular.ttf
- family: Electrolize
fonts:
- asset: fonts/Electrolize-Regular.ttf
assets:
- assets/images/
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:like/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(TC());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}

917 Bytes

<!DOCTYPE html>
<html>
<head>
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
For more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
This is a placeholder for base href that will be replaced by the value of
the `--base-href` argument provided to `flutter build`.
-->
<base href="$FLUTTER_BASE_HREF">
<meta charset="UTF-8">
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
<meta name="description" content="A new Flutter project.">
<!-- iOS meta tags & icons -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="like">
<link rel="apple-touch-icon" href="icons/Icon-192.png">
<title>like</title>
<link rel="manifest" href="manifest.json">
</head>
<body>
<!-- This script installs service_worker.js to provide PWA functionality to
application. For more information, see:
https://developers.google.com/web/fundamentals/primers/service-workers -->
<script>
var serviceWorkerVersion = null;
var scriptLoaded = false;
function loadMainDartJs() {
if (scriptLoaded) {
return;
}
scriptLoaded = true;
var scriptTag = document.createElement('script');
scriptTag.src = 'main.dart.js';
scriptTag.type = 'application/javascript';
document.body.append(scriptTag);
}
if ('serviceWorker' in navigator) {
// Service workers are supported. Use them.
window.addEventListener('load', function () {
// Wait for registration to finish before dropping the <script> tag.
// Otherwise, the browser will load the script multiple times,
// potentially different versions.
var serviceWorkerUrl = 'flutter_service_worker.js?v=' + serviceWorkerVersion;
navigator.serviceWorker.register(serviceWorkerUrl)
.then((reg) => {
function waitForActivation(serviceWorker) {
serviceWorker.addEventListener('statechange', () => {
if (serviceWorker.state == 'activated') {
console.log('Installed new service worker.');
loadMainDartJs();
}
});
}
if (!reg.active && (reg.installing || reg.waiting)) {
// No active web worker and we have installed or are installing
// one for the first time. Simply wait for it to activate.
waitForActivation(reg.installing || reg.waiting);
} else if (!reg.active.scriptURL.endsWith(serviceWorkerVersion)) {
// When the app updates the serviceWorkerVersion changes, so we
// need to ask the service worker to update.
console.log('New service worker available.');
reg.update();
waitForActivation(reg.installing);
} else {
// Existing service worker is still good.
console.log('Loading app from service worker.');
loadMainDartJs();
}
});
// If service worker doesn't succeed in a reasonable amount of time,
// fallback to plaint <script> tag.
setTimeout(() => {
if (!scriptLoaded) {
console.warn(
'Failed to load app from service worker. Falling back to plain <script> tag.',
);
loadMainDartJs();
}
}, 4000);
});
} else {
// Service workers not supported. Just drop the <script> tag.
loadMainDartJs();
}
</script>
</body>
</html>
{
"name": "like",
"short_name": "like",
"start_url": ".",
"display": "standalone",
"background_color": "#0175C2",
"theme_color": "#0175C2",
"description": "A new Flutter project.",
"orientation": "portrait-primary",
"prefer_related_applications": false,
"icons": [
{
"src": "icons/Icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icons/Icon-512.png",
"sizes": "512x512",
"type": "image/png"
},
{
"src": "icons/Icon-maskable-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "icons/Icon-maskable-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
]
}