├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── flightsearch │ │ │ └── MainActivity.java │ │ └── res │ │ ├── drawable │ │ └── launch_background.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle ├── flight_search.iml ├── flight_search_android.iml ├── fonts └── NothingYouCouldDo.ttf ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── main.m ├── lib ├── air_asia_bar.dart ├── content_card.dart ├── fade_route.dart ├── home_page.dart ├── main.dart ├── multicity_input.dart ├── price_tab │ ├── animated_dot.dart │ ├── animated_plane_icon.dart │ ├── flight_stop.dart │ ├── flight_stop_card.dart │ └── price_tab.dart ├── rounded_button.dart ├── ticket_page │ ├── flight_stop_ticket.dart │ ├── ticket_card.dart │ └── tickets_page.dart └── typable_text.dart ├── pubspec.lock ├── pubspec.yaml ├── res └── values │ └── strings_en.arb ├── screenshots ├── design.gif ├── implementation_2.gif └── original.gif └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | 9 | .flutter-plugins 10 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: c7ea3ca377e909469c68f2ab878a5bc53d3cf66b 8 | channel: beta 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flight search 2 | 3 | This is my second UI Challenge. I picked a [Jhony Vino](https://www.behance.net/johnyvino)'s [Flight search design](https://mir-s3-cdn-cf.behance.net/project_modules/max_1200/e36a3e53917017.594779c56ecbf.gif) from [100 Mobile App UI Interactions](https://www.behance.net/gallery/53917017/100-Best-Mobile-App-Interaction) and implemented it in Flutter. 4 | 5 | Whole process of development is documented on my [blog](https://marcinszalek.pl/flutter/ui-challenge-flight-search/). 6 | 7 | # Result 8 | On the left you can see the design, on the right my result. 9 | 10 | Original design My result 11 | 12 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | apply plugin: 'com.android.application' 15 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 16 | 17 | android { 18 | compileSdkVersion 27 19 | 20 | lintOptions { 21 | disable 'InvalidPackage' 22 | } 23 | 24 | defaultConfig { 25 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 26 | applicationId "com.example.flightsearch" 27 | minSdkVersion 16 28 | targetSdkVersion 27 29 | versionCode 1 30 | versionName "1.0" 31 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 32 | } 33 | 34 | buildTypes { 35 | release { 36 | // TODO: Add your own signing config for the release build. 37 | // Signing with the debug keys for now, so `flutter run --release` works. 38 | signingConfig signingConfigs.debug 39 | } 40 | } 41 | } 42 | 43 | flutter { 44 | source '../..' 45 | } 46 | 47 | dependencies { 48 | testImplementation 'junit:junit:4.12' 49 | androidTestImplementation 'com.android.support.test:runner:1.0.1' 50 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 51 | } 52 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/flightsearch/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.flightsearch; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.0.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip 7 | -------------------------------------------------------------------------------- /android/gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 10 | DEFAULT_JVM_OPTS="" 11 | 12 | APP_NAME="Gradle" 13 | APP_BASE_NAME=`basename "$0"` 14 | 15 | # Use the maximum available, or set MAX_FD != -1 to use that value. 16 | MAX_FD="maximum" 17 | 18 | warn ( ) { 19 | echo "$*" 20 | } 21 | 22 | die ( ) { 23 | echo 24 | echo "$*" 25 | echo 26 | exit 1 27 | } 28 | 29 | # OS specific support (must be 'true' or 'false'). 30 | cygwin=false 31 | msys=false 32 | darwin=false 33 | case "`uname`" in 34 | CYGWIN* ) 35 | cygwin=true 36 | ;; 37 | Darwin* ) 38 | darwin=true 39 | ;; 40 | MINGW* ) 41 | msys=true 42 | ;; 43 | esac 44 | 45 | # Attempt to set APP_HOME 46 | # Resolve links: $0 may be a link 47 | PRG="$0" 48 | # Need this for relative symlinks. 49 | while [ -h "$PRG" ] ; do 50 | ls=`ls -ld "$PRG"` 51 | link=`expr "$ls" : '.*-> \(.*\)$'` 52 | if expr "$link" : '/.*' > /dev/null; then 53 | PRG="$link" 54 | else 55 | PRG=`dirname "$PRG"`"/$link" 56 | fi 57 | done 58 | SAVED="`pwd`" 59 | cd "`dirname \"$PRG\"`/" >/dev/null 60 | APP_HOME="`pwd -P`" 61 | cd "$SAVED" >/dev/null 62 | 63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 64 | 65 | # Determine the Java command to use to start the JVM. 66 | if [ -n "$JAVA_HOME" ] ; then 67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 68 | # IBM's JDK on AIX uses strange locations for the executables 69 | JAVACMD="$JAVA_HOME/jre/sh/java" 70 | else 71 | JAVACMD="$JAVA_HOME/bin/java" 72 | fi 73 | if [ ! -x "$JAVACMD" ] ; then 74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 75 | 76 | Please set the JAVA_HOME variable in your environment to match the 77 | location of your Java installation." 78 | fi 79 | else 80 | JAVACMD="java" 81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 82 | 83 | Please set the JAVA_HOME variable in your environment to match the 84 | location of your Java installation." 85 | fi 86 | 87 | # Increase the maximum file descriptors if we can. 88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then 89 | MAX_FD_LIMIT=`ulimit -H -n` 90 | if [ $? -eq 0 ] ; then 91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 92 | MAX_FD="$MAX_FD_LIMIT" 93 | fi 94 | ulimit -n $MAX_FD 95 | if [ $? -ne 0 ] ; then 96 | warn "Could not set maximum file descriptor limit: $MAX_FD" 97 | fi 98 | else 99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 100 | fi 101 | fi 102 | 103 | # For Darwin, add options to specify how the application appears in the dock 104 | if $darwin; then 105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 106 | fi 107 | 108 | # For Cygwin, switch paths to Windows format before running java 109 | if $cygwin ; then 110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 112 | JAVACMD=`cygpath --unix "$JAVACMD"` 113 | 114 | # We build the pattern for arguments to be converted via cygpath 115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 116 | SEP="" 117 | for dir in $ROOTDIRSRAW ; do 118 | ROOTDIRS="$ROOTDIRS$SEP$dir" 119 | SEP="|" 120 | done 121 | OURCYGPATTERN="(^($ROOTDIRS))" 122 | # Add a user-defined pattern to the cygpath arguments 123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 125 | fi 126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 127 | i=0 128 | for arg in "$@" ; do 129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 131 | 132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 134 | else 135 | eval `echo args$i`="\"$arg\"" 136 | fi 137 | i=$((i+1)) 138 | done 139 | case $i in 140 | (0) set -- ;; 141 | (1) set -- "$args0" ;; 142 | (2) set -- "$args0" "$args1" ;; 143 | (3) set -- "$args0" "$args1" "$args2" ;; 144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 150 | esac 151 | fi 152 | 153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules 154 | function splitJvmOpts() { 155 | JVM_OPTS=("$@") 156 | } 157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS 158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" 159 | 160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" 161 | -------------------------------------------------------------------------------- /android/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windowz variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /flight_search.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /flight_search_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /fonts/NothingYouCouldDo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/fonts/NothingYouCouldDo.ttf -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | .symlinks/ 46 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; }; 19 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 20 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 46 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 48 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 9740EEB11CF90186004384FC /* Flutter */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 78 | 3B80C3931E831B6300D905FE /* App.framework */, 79 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 80 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 81 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 82 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 83 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 84 | ); 85 | name = Flutter; 86 | sourceTree = ""; 87 | }; 88 | 97C146E51CF9000F007C117D = { 89 | isa = PBXGroup; 90 | children = ( 91 | 9740EEB11CF90186004384FC /* Flutter */, 92 | 97C146F01CF9000F007C117D /* Runner */, 93 | 97C146EF1CF9000F007C117D /* Products */, 94 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 97C146EF1CF9000F007C117D /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 97C146EE1CF9000F007C117D /* Runner.app */, 102 | ); 103 | name = Products; 104 | sourceTree = ""; 105 | }; 106 | 97C146F01CF9000F007C117D /* Runner */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 110 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 111 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 112 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 113 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 114 | 97C147021CF9000F007C117D /* Info.plist */, 115 | 97C146F11CF9000F007C117D /* Supporting Files */, 116 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 117 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 118 | ); 119 | path = Runner; 120 | sourceTree = ""; 121 | }; 122 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 97C146F21CF9000F007C117D /* main.m */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | /* End PBXGroup section */ 131 | 132 | /* Begin PBXNativeTarget section */ 133 | 97C146ED1CF9000F007C117D /* Runner */ = { 134 | isa = PBXNativeTarget; 135 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 136 | buildPhases = ( 137 | 9740EEB61CF901F6004384FC /* Run Script */, 138 | 97C146EA1CF9000F007C117D /* Sources */, 139 | 97C146EB1CF9000F007C117D /* Frameworks */, 140 | 97C146EC1CF9000F007C117D /* Resources */, 141 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 142 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 143 | ); 144 | buildRules = ( 145 | ); 146 | dependencies = ( 147 | ); 148 | name = Runner; 149 | productName = Runner; 150 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 151 | productType = "com.apple.product-type.application"; 152 | }; 153 | /* End PBXNativeTarget section */ 154 | 155 | /* Begin PBXProject section */ 156 | 97C146E61CF9000F007C117D /* Project object */ = { 157 | isa = PBXProject; 158 | attributes = { 159 | LastUpgradeCheck = 0910; 160 | ORGANIZATIONNAME = "The Chromium Authors"; 161 | TargetAttributes = { 162 | 97C146ED1CF9000F007C117D = { 163 | CreatedOnToolsVersion = 7.3.1; 164 | }; 165 | }; 166 | }; 167 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 168 | compatibilityVersion = "Xcode 3.2"; 169 | developmentRegion = English; 170 | hasScannedForEncodings = 0; 171 | knownRegions = ( 172 | en, 173 | Base, 174 | ); 175 | mainGroup = 97C146E51CF9000F007C117D; 176 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 177 | projectDirPath = ""; 178 | projectRoot = ""; 179 | targets = ( 180 | 97C146ED1CF9000F007C117D /* Runner */, 181 | ); 182 | }; 183 | /* End PBXProject section */ 184 | 185 | /* Begin PBXResourcesBuildPhase section */ 186 | 97C146EC1CF9000F007C117D /* Resources */ = { 187 | isa = PBXResourcesBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 191 | 9740EEB51CF90195004384FC /* Generated.xcconfig in Resources */, 192 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 193 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 194 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 195 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 196 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 197 | ); 198 | runOnlyForDeploymentPostprocessing = 0; 199 | }; 200 | /* End PBXResourcesBuildPhase section */ 201 | 202 | /* Begin PBXShellScriptBuildPhase section */ 203 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 204 | isa = PBXShellScriptBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | ); 208 | inputPaths = ( 209 | ); 210 | name = "Thin Binary"; 211 | outputPaths = ( 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | shellPath = /bin/sh; 215 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 216 | }; 217 | 9740EEB61CF901F6004384FC /* Run Script */ = { 218 | isa = PBXShellScriptBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | ); 222 | inputPaths = ( 223 | ); 224 | name = "Run Script"; 225 | outputPaths = ( 226 | ); 227 | runOnlyForDeploymentPostprocessing = 0; 228 | shellPath = /bin/sh; 229 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 230 | }; 231 | /* End PBXShellScriptBuildPhase section */ 232 | 233 | /* Begin PBXSourcesBuildPhase section */ 234 | 97C146EA1CF9000F007C117D /* Sources */ = { 235 | isa = PBXSourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 239 | 97C146F31CF9000F007C117D /* main.m in Sources */, 240 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | /* End PBXSourcesBuildPhase section */ 245 | 246 | /* Begin PBXVariantGroup section */ 247 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | 97C146FB1CF9000F007C117D /* Base */, 251 | ); 252 | name = Main.storyboard; 253 | sourceTree = ""; 254 | }; 255 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 256 | isa = PBXVariantGroup; 257 | children = ( 258 | 97C147001CF9000F007C117D /* Base */, 259 | ); 260 | name = LaunchScreen.storyboard; 261 | sourceTree = ""; 262 | }; 263 | /* End PBXVariantGroup section */ 264 | 265 | /* Begin XCBuildConfiguration section */ 266 | 97C147031CF9000F007C117D /* Debug */ = { 267 | isa = XCBuildConfiguration; 268 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_ANALYZER_NONNULL = YES; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 273 | CLANG_CXX_LIBRARY = "libc++"; 274 | CLANG_ENABLE_MODULES = YES; 275 | CLANG_ENABLE_OBJC_ARC = YES; 276 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_COMMA = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 281 | CLANG_WARN_EMPTY_BODY = YES; 282 | CLANG_WARN_ENUM_CONVERSION = YES; 283 | CLANG_WARN_INFINITE_RECURSION = YES; 284 | CLANG_WARN_INT_CONVERSION = YES; 285 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 286 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 287 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 288 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 289 | CLANG_WARN_STRICT_PROTOTYPES = YES; 290 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 291 | CLANG_WARN_UNREACHABLE_CODE = YES; 292 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 293 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 294 | COPY_PHASE_STRIP = NO; 295 | DEBUG_INFORMATION_FORMAT = dwarf; 296 | ENABLE_STRICT_OBJC_MSGSEND = YES; 297 | ENABLE_TESTABILITY = YES; 298 | GCC_C_LANGUAGE_STANDARD = gnu99; 299 | GCC_DYNAMIC_NO_PIC = NO; 300 | GCC_NO_COMMON_BLOCKS = YES; 301 | GCC_OPTIMIZATION_LEVEL = 0; 302 | GCC_PREPROCESSOR_DEFINITIONS = ( 303 | "DEBUG=1", 304 | "$(inherited)", 305 | ); 306 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 307 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 308 | GCC_WARN_UNDECLARED_SELECTOR = YES; 309 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 310 | GCC_WARN_UNUSED_FUNCTION = YES; 311 | GCC_WARN_UNUSED_VARIABLE = YES; 312 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 313 | MTL_ENABLE_DEBUG_INFO = YES; 314 | ONLY_ACTIVE_ARCH = YES; 315 | SDKROOT = iphoneos; 316 | TARGETED_DEVICE_FAMILY = "1,2"; 317 | }; 318 | name = Debug; 319 | }; 320 | 97C147041CF9000F007C117D /* Release */ = { 321 | isa = XCBuildConfiguration; 322 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 323 | buildSettings = { 324 | ALWAYS_SEARCH_USER_PATHS = NO; 325 | CLANG_ANALYZER_NONNULL = YES; 326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 327 | CLANG_CXX_LIBRARY = "libc++"; 328 | CLANG_ENABLE_MODULES = YES; 329 | CLANG_ENABLE_OBJC_ARC = YES; 330 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 331 | CLANG_WARN_BOOL_CONVERSION = YES; 332 | CLANG_WARN_COMMA = YES; 333 | CLANG_WARN_CONSTANT_CONVERSION = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 341 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 342 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 343 | CLANG_WARN_STRICT_PROTOTYPES = YES; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNREACHABLE_CODE = YES; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 348 | COPY_PHASE_STRIP = NO; 349 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 350 | ENABLE_NS_ASSERTIONS = NO; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_NO_COMMON_BLOCKS = YES; 354 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 355 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 356 | GCC_WARN_UNDECLARED_SELECTOR = YES; 357 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 358 | GCC_WARN_UNUSED_FUNCTION = YES; 359 | GCC_WARN_UNUSED_VARIABLE = YES; 360 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 361 | MTL_ENABLE_DEBUG_INFO = NO; 362 | SDKROOT = iphoneos; 363 | TARGETED_DEVICE_FAMILY = "1,2"; 364 | VALIDATE_PRODUCT = YES; 365 | }; 366 | name = Release; 367 | }; 368 | 97C147061CF9000F007C117D /* Debug */ = { 369 | isa = XCBuildConfiguration; 370 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 371 | buildSettings = { 372 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 373 | CURRENT_PROJECT_VERSION = 1; 374 | ENABLE_BITCODE = NO; 375 | FRAMEWORK_SEARCH_PATHS = ( 376 | "$(inherited)", 377 | "$(PROJECT_DIR)/Flutter", 378 | ); 379 | INFOPLIST_FILE = Runner/Info.plist; 380 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 381 | LIBRARY_SEARCH_PATHS = ( 382 | "$(inherited)", 383 | "$(PROJECT_DIR)/Flutter", 384 | ); 385 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flightSearch; 386 | PRODUCT_NAME = "$(TARGET_NAME)"; 387 | VERSIONING_SYSTEM = "apple-generic"; 388 | }; 389 | name = Debug; 390 | }; 391 | 97C147071CF9000F007C117D /* Release */ = { 392 | isa = XCBuildConfiguration; 393 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 394 | buildSettings = { 395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 396 | CURRENT_PROJECT_VERSION = 1; 397 | ENABLE_BITCODE = NO; 398 | FRAMEWORK_SEARCH_PATHS = ( 399 | "$(inherited)", 400 | "$(PROJECT_DIR)/Flutter", 401 | ); 402 | INFOPLIST_FILE = Runner/Info.plist; 403 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 404 | LIBRARY_SEARCH_PATHS = ( 405 | "$(inherited)", 406 | "$(PROJECT_DIR)/Flutter", 407 | ); 408 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flightSearch; 409 | PRODUCT_NAME = "$(TARGET_NAME)"; 410 | VERSIONING_SYSTEM = "apple-generic"; 411 | }; 412 | name = Release; 413 | }; 414 | /* End XCBuildConfiguration section */ 415 | 416 | /* Begin XCConfigurationList section */ 417 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 418 | isa = XCConfigurationList; 419 | buildConfigurations = ( 420 | 97C147031CF9000F007C117D /* Debug */, 421 | 97C147041CF9000F007C117D /* Release */, 422 | ); 423 | defaultConfigurationIsVisible = 0; 424 | defaultConfigurationName = Release; 425 | }; 426 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 427 | isa = XCConfigurationList; 428 | buildConfigurations = ( 429 | 97C147061CF9000F007C117D /* Debug */, 430 | 97C147071CF9000F007C117D /* Release */, 431 | ); 432 | defaultConfigurationIsVisible = 0; 433 | defaultConfigurationName = Release; 434 | }; 435 | /* End XCConfigurationList section */ 436 | }; 437 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 438 | } 439 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | 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. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flight_search 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/air_asia_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AirAsiaBar extends StatelessWidget { 4 | final double height; 5 | 6 | const AirAsiaBar({Key key, this.height}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Stack( 11 | children: [ 12 | new Container( 13 | decoration: new BoxDecoration( 14 | gradient: new LinearGradient( 15 | begin: Alignment.topCenter, 16 | end: Alignment.bottomCenter, 17 | colors: [Colors.red, const Color(0xFFE64C85)], 18 | ), 19 | ), 20 | height: height, 21 | ), 22 | new AppBar( 23 | backgroundColor: Colors.transparent, 24 | elevation: 0.0, 25 | centerTitle: true, 26 | title: new Text( 27 | "AirAsia", 28 | style: TextStyle( 29 | fontFamily: 'NothingYouCouldDo', fontWeight: FontWeight.bold), 30 | ), 31 | ), 32 | ], 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/content_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flight_search/multicity_input.dart'; 2 | import 'package:flight_search/price_tab/price_tab.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class ContentCard extends StatefulWidget { 6 | @override 7 | _ContentCardState createState() => _ContentCardState(); 8 | } 9 | 10 | class _ContentCardState extends State { 11 | bool showInput = true; 12 | bool showInputTabOptions = true; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return new Card( 17 | elevation: 4.0, 18 | margin: const EdgeInsets.all(8.0), 19 | child: DefaultTabController( 20 | child: new LayoutBuilder( 21 | builder: (BuildContext context, BoxConstraints viewportConstraints) { 22 | return Column( 23 | children: [ 24 | _buildTabBar(), 25 | _buildContentContainer(viewportConstraints), 26 | ], 27 | ); 28 | }, 29 | ), 30 | length: 3, 31 | ), 32 | ); 33 | } 34 | 35 | Widget _buildTabBar({bool showFirstOption}) { 36 | return Stack( 37 | children: [ 38 | new Positioned.fill( 39 | top: null, 40 | child: new Container( 41 | height: 2.0, 42 | color: new Color(0xFFEEEEEE), 43 | ), 44 | ), 45 | new TabBar( 46 | tabs: [ 47 | Tab(text: showInputTabOptions ? "Flight" : "Price"), 48 | Tab(text: showInputTabOptions ? "Train" : "Duration"), 49 | Tab(text: showInputTabOptions ? "Bus" : "Stops"), 50 | ], 51 | labelColor: Colors.black, 52 | unselectedLabelColor: Colors.grey, 53 | ), 54 | ], 55 | ); 56 | } 57 | 58 | Widget _buildContentContainer(BoxConstraints viewportConstraints) { 59 | return Expanded( 60 | child: SingleChildScrollView( 61 | child: new ConstrainedBox( 62 | constraints: new BoxConstraints( 63 | minHeight: viewportConstraints.maxHeight - 48.0, 64 | ), 65 | child: new IntrinsicHeight( 66 | child: showInput 67 | ? _buildMulticityTab() 68 | : PriceTab( 69 | height: viewportConstraints.maxHeight - 48.0, 70 | onPlaneFlightStart: () => 71 | setState(() => showInputTabOptions = false), 72 | ), 73 | ), 74 | ), 75 | ), 76 | ); 77 | } 78 | 79 | Widget _buildMulticityTab() { 80 | return Column( 81 | children: [ 82 | MulticityInput(), 83 | Expanded(child: Container()), 84 | Padding( 85 | padding: const EdgeInsets.only(bottom: 16.0, top: 8.0), 86 | child: FloatingActionButton( 87 | onPressed: () => setState(() => showInput = false), 88 | child: Icon(Icons.timeline, size: 36.0), 89 | ), 90 | ), 91 | ], 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/fade_route.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class FadeRoute extends MaterialPageRoute { 4 | FadeRoute({WidgetBuilder builder, RouteSettings settings}) 5 | : super(builder: builder, settings: settings); 6 | 7 | @override 8 | Duration get transitionDuration => const Duration(milliseconds: 100); 9 | 10 | @override 11 | Widget buildTransitions(BuildContext context, Animation animation, 12 | Animation secondaryAnimation, Widget child) { 13 | if (settings.isInitialRoute) return child; 14 | // Fades between routes. (If you don't want any animation, 15 | // just return child.) 16 | return new FadeTransition(opacity: animation, child: child); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flight_search/air_asia_bar.dart'; 2 | import 'package:flight_search/content_card.dart'; 3 | import 'package:flight_search/rounded_button.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class HomePage extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | return Scaffold( 10 | body: Stack( 11 | children: [ 12 | AirAsiaBar(height: 210.0), 13 | Positioned.fill( 14 | child: Padding( 15 | padding: EdgeInsets.only( 16 | top: MediaQuery.of(context).padding.top + 40.0), 17 | child: new Column( 18 | children: [ 19 | _buildButtonsRow(), 20 | Expanded(child: ContentCard()), 21 | ], 22 | ), 23 | ), 24 | ), 25 | ], 26 | ), 27 | ); 28 | } 29 | 30 | Widget _buildButtonsRow() { 31 | return Padding( 32 | padding: const EdgeInsets.all(8.0), 33 | child: Row( 34 | children: [ 35 | new RoundedButton(text: "ONE WAY"), 36 | new RoundedButton(text: "ROUND"), 37 | new RoundedButton(text: "MULTICITY", selected: true), 38 | ], 39 | ), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flight_search/home_page.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | void main() => runApp(new MyApp()); 5 | 6 | class MyApp extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | return new MaterialApp( 10 | debugShowCheckedModeBanner: false, 11 | title: 'Flight Search', 12 | theme: new ThemeData( 13 | primarySwatch: Colors.red, 14 | ), 15 | home: new HomePage(), 16 | ); 17 | } 18 | } -------------------------------------------------------------------------------- /lib/multicity_input.dart: -------------------------------------------------------------------------------- 1 | import 'package:flight_search/typable_text.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class MulticityInput extends StatefulWidget { 5 | @override 6 | MulticityInputState createState() { 7 | return new MulticityInputState(); 8 | } 9 | } 10 | 11 | class MulticityInputState extends State 12 | with TickerProviderStateMixin { 13 | AnimationController textInputAnimationController; 14 | Animation fromAnimation; 15 | Animation toAnimation1; 16 | Animation toAnimation2; 17 | Animation passengersAnimation; 18 | Animation departureAnimation; 19 | Animation arrivalAnimation; 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | textInputAnimationController = new AnimationController( 25 | vsync: this, duration: Duration(milliseconds: 800)); 26 | fromAnimation = new CurvedAnimation( 27 | parent: textInputAnimationController, 28 | curve: Interval(0.0, 0.2, curve: Curves.linear)); 29 | toAnimation1 = new CurvedAnimation( 30 | parent: textInputAnimationController, 31 | curve: Interval(0.15, 0.35, curve: Curves.linear)); 32 | toAnimation2 = new CurvedAnimation( 33 | parent: textInputAnimationController, 34 | curve: Interval(0.3, 0.5, curve: Curves.linear)); 35 | passengersAnimation = new CurvedAnimation( 36 | parent: textInputAnimationController, 37 | curve: Interval(0.45, 0.65, curve: Curves.linear)); 38 | departureAnimation = new CurvedAnimation( 39 | parent: textInputAnimationController, 40 | curve: Interval(0.6, 0.8, curve: Curves.linear)); 41 | arrivalAnimation = new CurvedAnimation( 42 | parent: textInputAnimationController, 43 | curve: Interval(0.75, 0.95, curve: Curves.linear)); 44 | } 45 | 46 | @override 47 | void dispose() { 48 | textInputAnimationController.dispose(); 49 | super.dispose(); 50 | } 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return Form( 55 | child: Padding( 56 | padding: const EdgeInsets.all(16.0), 57 | child: Column( 58 | children: [ 59 | Padding( 60 | padding: const EdgeInsets.fromLTRB(0.0, 0.0, 64.0, 8.0), 61 | child: TypeableTextFormField( 62 | finalText: "Kochfurt", 63 | animation: fromAnimation, 64 | decoration: InputDecoration( 65 | icon: Icon(Icons.flight_takeoff, color: Colors.red), 66 | labelText: "From", 67 | ), 68 | ), 69 | ), 70 | Padding( 71 | padding: const EdgeInsets.fromLTRB(0.0, 0.0, 64.0, 8.0), 72 | child: TypeableTextFormField( 73 | animation: toAnimation1, 74 | finalText: "Lake Xanderland", 75 | decoration: InputDecoration( 76 | icon: Icon(Icons.flight_land, color: Colors.red), 77 | labelText: "To", 78 | ), 79 | ), 80 | ), 81 | Row( 82 | children: [ 83 | Expanded( 84 | child: Padding( 85 | padding: const EdgeInsets.only(bottom: 8.0), 86 | child: TypeableTextFormField( 87 | animation: toAnimation2, 88 | finalText: "South Darian", 89 | decoration: InputDecoration( 90 | icon: Icon(Icons.flight_land, color: Colors.red), 91 | labelText: "To", 92 | ), 93 | ), 94 | ), 95 | ), 96 | Container( 97 | width: 64.0, 98 | alignment: Alignment.center, 99 | child: IconButton( 100 | onPressed: () => textInputAnimationController.forward(), 101 | icon: Icon(Icons.add_circle_outline, color: Colors.grey)), 102 | ), 103 | ], 104 | ), 105 | Padding( 106 | padding: const EdgeInsets.fromLTRB(0.0, 0.0, 64.0, 8.0), 107 | child: TypeableTextFormField( 108 | animation: passengersAnimation, 109 | finalText: "4", 110 | decoration: InputDecoration( 111 | icon: Icon(Icons.person, color: Colors.red), 112 | labelText: "Passengers", 113 | ), 114 | ), 115 | ), 116 | Row( 117 | children: [ 118 | Padding( 119 | padding: const EdgeInsets.only(right: 16.0), 120 | child: Icon(Icons.date_range, color: Colors.red), 121 | ), 122 | Expanded( 123 | child: Padding( 124 | padding: const EdgeInsets.only(right: 16.0), 125 | child: TypeableTextFormField( 126 | animation: departureAnimation, 127 | finalText: "29 June 2017", 128 | decoration: InputDecoration(labelText: "Departure"), 129 | ), 130 | ), 131 | ), 132 | Expanded( 133 | child: Padding( 134 | padding: const EdgeInsets.only(left: 16.0), 135 | child: TypeableTextFormField( 136 | animation: arrivalAnimation, 137 | finalText: "29 July 2017", 138 | decoration: InputDecoration(labelText: "Arrival"), 139 | ), 140 | ), 141 | ), 142 | ], 143 | ), 144 | ], 145 | ), 146 | ), 147 | ); 148 | } 149 | } 150 | -------------------------------------------------------------------------------- /lib/price_tab/animated_dot.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AnimatedDot extends AnimatedWidget { 4 | final Color color; 5 | static final double size = 24.0; 6 | 7 | AnimatedDot({ 8 | Key key, 9 | Animation animation, 10 | @required this.color, 11 | }) : super(key: key, listenable: animation); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | Animation animation = super.listenable; 16 | return Positioned( 17 | top: animation.value, 18 | child: Container( 19 | height: size, 20 | width: size, 21 | decoration: BoxDecoration( 22 | color: Colors.white, 23 | shape: BoxShape.circle, 24 | border: Border.all(color: Color(0xFFDDDDDD), width: 1.0)), 25 | child: Padding( 26 | padding: const EdgeInsets.all(4.0), 27 | child: DecoratedBox( 28 | decoration: BoxDecoration(color: color, shape: BoxShape.circle), 29 | ), 30 | )), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/price_tab/animated_plane_icon.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AnimatedPlaneIcon extends AnimatedWidget { 4 | AnimatedPlaneIcon({Key key, Animation animation}) 5 | : super(key: key, listenable: animation); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | Animation animation = super.listenable; 10 | return Icon( 11 | Icons.airplanemode_active, 12 | color: Colors.red, 13 | size: animation.value, 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/price_tab/flight_stop.dart: -------------------------------------------------------------------------------- 1 | class FlightStop { 2 | String from; 3 | String to; 4 | String date; 5 | String duration; 6 | String price; 7 | String fromToTime; 8 | 9 | FlightStop(this.from, this.to, this.date, this.duration, this.price, 10 | this.fromToTime); 11 | } 12 | 13 | class TicketFlightStop { 14 | String from; 15 | String fromShort; 16 | String to; 17 | String toShort; 18 | String flightNumber; 19 | 20 | TicketFlightStop( 21 | this.from, this.fromShort, this.to, this.toShort, this.flightNumber); 22 | } 23 | -------------------------------------------------------------------------------- /lib/price_tab/flight_stop_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flight_search/price_tab/flight_stop.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/rendering.dart'; 4 | 5 | class FlightStopCard extends StatefulWidget { 6 | final FlightStop flightStop; 7 | final bool isLeft; 8 | static const double height = 80.0; 9 | static const double width = 140.0; 10 | 11 | const FlightStopCard( 12 | {Key key, @required this.flightStop, @required this.isLeft}) 13 | : super(key: key); 14 | 15 | @override 16 | FlightStopCardState createState() => FlightStopCardState(); 17 | } 18 | 19 | class FlightStopCardState extends State 20 | with TickerProviderStateMixin { 21 | AnimationController _animationController; 22 | Animation _cardSizeAnimation; 23 | Animation _durationPositionAnimation; 24 | Animation _airportsPositionAnimation; 25 | Animation _datePositionAnimation; 26 | Animation _pricePositionAnimation; 27 | Animation _fromToPositionAnimation; 28 | Animation _lineAnimation; 29 | 30 | @override 31 | void initState() { 32 | super.initState(); 33 | _animationController = new AnimationController( 34 | vsync: this, duration: Duration(milliseconds: 600)); 35 | _cardSizeAnimation = new CurvedAnimation( 36 | parent: _animationController, 37 | curve: new Interval(0.0, 0.9, curve: new ElasticOutCurve(0.8))); 38 | _durationPositionAnimation = new CurvedAnimation( 39 | parent: _animationController, 40 | curve: new Interval(0.05, 0.95, curve: new ElasticOutCurve(0.95))); 41 | _airportsPositionAnimation = new CurvedAnimation( 42 | parent: _animationController, 43 | curve: new Interval(0.1, 1.0, curve: new ElasticOutCurve(0.95))); 44 | _datePositionAnimation = new CurvedAnimation( 45 | parent: _animationController, 46 | curve: new Interval(0.1, 0.8, curve: new ElasticOutCurve(0.95))); 47 | _pricePositionAnimation = new CurvedAnimation( 48 | parent: _animationController, 49 | curve: new Interval(0.0, 0.9, curve: new ElasticOutCurve(0.95))); 50 | _fromToPositionAnimation = new CurvedAnimation( 51 | parent: _animationController, 52 | curve: new Interval(0.1, 0.95, curve: new ElasticOutCurve(0.95))); 53 | _lineAnimation = new CurvedAnimation( 54 | parent: _animationController, 55 | curve: new Interval(0.0, 0.2, curve: Curves.linear)); 56 | } 57 | 58 | @override 59 | void dispose() { 60 | _animationController.dispose(); 61 | super.dispose(); 62 | } 63 | 64 | void runAnimation() { 65 | _animationController.forward(); 66 | } 67 | 68 | @override 69 | Widget build(BuildContext context) { 70 | return Container( 71 | height: FlightStopCard.height, 72 | child: AnimatedBuilder( 73 | animation: _animationController, 74 | builder: (context, child) => new Stack( 75 | alignment: Alignment.centerLeft, 76 | children: [ 77 | buildLine(), 78 | buildCard(), 79 | buildDurationText(), 80 | buildAirportNamesText(), 81 | buildDateText(), 82 | buildPriceText(), 83 | buildFromToTimeText(), 84 | ], 85 | ), 86 | ), 87 | ); 88 | } 89 | 90 | double get maxWidth { 91 | RenderBox renderBox = context.findRenderObject(); 92 | BoxConstraints constraints = renderBox?.constraints; 93 | double maxWidth = constraints?.maxWidth ?? 0.0; 94 | return maxWidth; 95 | } 96 | 97 | Positioned buildDurationText() { 98 | double animationValue = _durationPositionAnimation.value; 99 | return Positioned( 100 | top: getMarginTop(animationValue), //<--- animate vertical position 101 | right: getMarginRight(animationValue), //<--- animate horizontal pozition 102 | child: Text( 103 | widget.flightStop.duration, 104 | style: new TextStyle( 105 | fontSize: 10.0 * animationValue, //<--- animate fontsize 106 | color: Colors.grey, 107 | ), 108 | ), 109 | ); 110 | } 111 | 112 | Positioned buildAirportNamesText() { 113 | double animationValue = _airportsPositionAnimation.value; 114 | return Positioned( 115 | top: getMarginTop(animationValue), 116 | left: getMarginLeft(animationValue), 117 | child: Text( 118 | "${widget.flightStop.from} \u00B7 ${widget.flightStop.to}", 119 | style: new TextStyle( 120 | fontSize: 14.0*animationValue, 121 | color: Colors.grey, 122 | ), 123 | ), 124 | ); 125 | } 126 | 127 | Positioned buildDateText() { 128 | double animationValue = _datePositionAnimation.value; 129 | return Positioned( 130 | left: getMarginLeft(animationValue), 131 | child: Text( 132 | "${widget.flightStop.date}", 133 | style: new TextStyle( 134 | fontSize: 14.0 * animationValue, 135 | color: Colors.grey, 136 | ), 137 | ), 138 | ); 139 | } 140 | 141 | Positioned buildPriceText() { 142 | double animationValue = _pricePositionAnimation.value; 143 | return Positioned( 144 | right: getMarginRight(animationValue), 145 | child: Text( 146 | "${widget.flightStop.price}", 147 | style: new TextStyle( 148 | fontSize: 16.0* animationValue, color: Colors.black, fontWeight: FontWeight.bold,), 149 | ), 150 | ); 151 | } 152 | 153 | Positioned buildFromToTimeText() { 154 | double animationValue = _fromToPositionAnimation.value; 155 | return Positioned( 156 | left: getMarginLeft(animationValue), 157 | bottom: getMarginBottom(animationValue), 158 | child: Text( 159 | "${widget.flightStop.fromToTime}", 160 | style: new TextStyle( 161 | fontSize: 12.0* animationValue, color: Colors.grey, fontWeight: FontWeight.w500,), 162 | ), 163 | ); 164 | } 165 | 166 | Widget buildLine() { 167 | double animationValue = _lineAnimation.value; 168 | double maxLength = maxWidth - FlightStopCard.width; 169 | return Align( 170 | alignment: widget.isLeft ? Alignment.centerRight : Alignment.centerLeft, 171 | child: Container( 172 | height: 2.0, 173 | width: maxLength * animationValue, 174 | color: Color.fromARGB(255, 200, 200, 200), 175 | )); 176 | } 177 | 178 | Positioned buildCard() { 179 | double animationValue = _cardSizeAnimation.value; 180 | double minOuterMargin = 8.0; 181 | double outerMargin = 182 | minOuterMargin + (1 - animationValue) * maxWidth; 183 | return Positioned( 184 | right: widget.isLeft ? null : outerMargin, 185 | left: widget.isLeft ? outerMargin : null, 186 | child: Transform.scale( 187 | scale: animationValue, 188 | child: Container( 189 | width: 140.0, 190 | height: 80.0, 191 | child: new Card( 192 | color: Colors.grey.shade100, 193 | ), 194 | ), 195 | ), 196 | ); 197 | } 198 | 199 | double getMarginBottom(double animationValue) { 200 | double minBottomMargin = 8.0; 201 | double bottomMargin = 202 | minBottomMargin + (1 - animationValue) * minBottomMargin; 203 | return bottomMargin; 204 | } 205 | 206 | double getMarginTop(double animationValue) { 207 | double minMarginTop = 8.0; 208 | double marginTop = 209 | minMarginTop + (1 - animationValue) * FlightStopCard.height * 0.5; 210 | return marginTop; 211 | } 212 | 213 | double getMarginLeft(double animationValue) { 214 | return getMarginHorizontal(animationValue, true); 215 | } 216 | 217 | double getMarginRight(double animationValue) { 218 | return getMarginHorizontal(animationValue, false); 219 | } 220 | 221 | double getMarginHorizontal(double animationValue, bool isTextLeft) { 222 | if (isTextLeft == widget.isLeft) { 223 | double minHorizontalMargin = 16.0; 224 | double maxHorizontalMargin = maxWidth - minHorizontalMargin; 225 | double horizontalMargin = 226 | minHorizontalMargin + (1 - animationValue) * maxHorizontalMargin; 227 | return horizontalMargin; 228 | } else { 229 | double maxHorizontalMargin = maxWidth - FlightStopCard.width; 230 | double horizontalMargin = animationValue * maxHorizontalMargin; 231 | return horizontalMargin; 232 | } 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /lib/price_tab/price_tab.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flight_search/fade_route.dart'; 4 | import 'package:flight_search/price_tab/animated_dot.dart'; 5 | import 'package:flight_search/price_tab/animated_plane_icon.dart'; 6 | import 'package:flight_search/price_tab/flight_stop.dart'; 7 | import 'package:flight_search/price_tab/flight_stop_card.dart'; 8 | import 'package:flight_search/ticket_page/tickets_page.dart'; 9 | import 'package:flutter/material.dart'; 10 | 11 | class PriceTab extends StatefulWidget { 12 | final double height; 13 | final VoidCallback onPlaneFlightStart; 14 | 15 | const PriceTab({Key key, this.height, this.onPlaneFlightStart}) 16 | : super(key: key); 17 | 18 | @override 19 | _PriceTabState createState() => _PriceTabState(); 20 | } 21 | 22 | class _PriceTabState extends State with TickerProviderStateMixin { 23 | final double _initialPlanePaddingBottom = 16.0; 24 | final double _minPlanePaddingTop = 16.0; 25 | final List _flightStops = [ 26 | FlightStop("JFK", "ORY", "JUN 05", "6h 25m", "\$851", "9:26 am - 3:43 pm"), 27 | FlightStop("MRG", "FTB", "JUN 20", "6h 25m", "\$532", "9:26 am - 3:43 pm"), 28 | FlightStop("ERT", "TVS", "JUN 20", "6h 25m", "\$718", "9:26 am - 3:43 pm"), 29 | FlightStop("KKR", "RTY", "JUN 20", "6h 25m", "\$663", "9:26 am - 3:43 pm"), 30 | ]; 31 | final List> _stopKeys = []; 32 | 33 | AnimationController _planeSizeAnimationController; 34 | AnimationController _planeTravelController; 35 | AnimationController _dotsAnimationController; 36 | AnimationController _fabAnimationController; 37 | Animation _planeSizeAnimation; 38 | Animation _planeTravelAnimation; 39 | Animation _fabAnimation; 40 | 41 | List> _dotPositions = []; 42 | 43 | double get _planeTopPadding => 44 | _minPlanePaddingTop + 45 | (1 - _planeTravelAnimation.value) * _maxPlaneTopPadding; 46 | 47 | double get _maxPlaneTopPadding => 48 | widget.height - 49 | _minPlanePaddingTop - 50 | _initialPlanePaddingBottom - 51 | _planeSize; 52 | 53 | double get _planeSize => _planeSizeAnimation.value; 54 | 55 | @override 56 | void initState() { 57 | super.initState(); 58 | _initSizeAnimations(); 59 | _initPlaneTravelAnimations(); 60 | _initDotAnimationController(); 61 | _initDotAnimations(); 62 | _initFabAnimationController(); 63 | _flightStops 64 | .forEach((stop) => _stopKeys.add(new GlobalKey())); 65 | _planeSizeAnimationController.forward(); 66 | } 67 | 68 | @override 69 | void dispose() { 70 | _planeSizeAnimationController.dispose(); 71 | _planeTravelController.dispose(); 72 | _dotsAnimationController.dispose(); 73 | _fabAnimationController.dispose(); 74 | super.dispose(); 75 | } 76 | 77 | @override 78 | Widget build(BuildContext context) { 79 | return Container( 80 | width: double.infinity, 81 | child: Stack( 82 | alignment: Alignment.center, 83 | children: [_buildPlane()] 84 | ..addAll(_flightStops.map(_buildStopCard)) 85 | ..addAll(_flightStops.map(_mapFlightStopToDot)) 86 | ..add(_buildFab()), 87 | ), 88 | ); 89 | } 90 | 91 | Widget _buildStopCard(FlightStop stop) { 92 | int index = _flightStops.indexOf(stop); 93 | double topMargin = _dotPositions[index].value - 94 | 0.5 * (FlightStopCard.height - AnimatedDot.size); 95 | bool isLeft = index.isOdd; 96 | return Align( 97 | alignment: Alignment.topCenter, 98 | child: Padding( 99 | padding: EdgeInsets.only(top: topMargin), 100 | child: Row( 101 | mainAxisSize: MainAxisSize.max, 102 | crossAxisAlignment: CrossAxisAlignment.start, 103 | children: [ 104 | isLeft ? Container() : Expanded(child: Container()), 105 | Expanded( 106 | child: FlightStopCard( 107 | key: _stopKeys[index], 108 | flightStop: stop, 109 | isLeft: isLeft, 110 | ), 111 | ), 112 | !isLeft ? Container() : Expanded(child: Container()), 113 | ], 114 | ), 115 | ), 116 | ); 117 | } 118 | 119 | Widget _mapFlightStopToDot(stop) { 120 | int index = _flightStops.indexOf(stop); 121 | bool isStartOrEnd = index == 0 || index == _flightStops.length - 1; 122 | Color color = isStartOrEnd ? Colors.red : Colors.green; 123 | return AnimatedDot( 124 | animation: _dotPositions[index], 125 | color: color, 126 | ); 127 | } 128 | 129 | Widget _buildPlane() { 130 | return AnimatedBuilder( 131 | animation: _planeTravelAnimation, 132 | child: Column( 133 | children: [ 134 | AnimatedPlaneIcon(animation: _planeSizeAnimation), 135 | Container( 136 | width: 2.0, 137 | height: _flightStops.length * FlightStopCard.height * 0.8, 138 | color: Color.fromARGB(255, 200, 200, 200), 139 | ), 140 | ], 141 | ), 142 | builder: (context, child) => Positioned( 143 | top: _planeTopPadding, 144 | child: child, 145 | ), 146 | ); 147 | } 148 | 149 | Widget _buildFab() { 150 | return Positioned( 151 | bottom: 16.0, 152 | child: ScaleTransition( 153 | scale: _fabAnimation, 154 | child: FloatingActionButton( 155 | onPressed: () => Navigator 156 | .of(context) 157 | .push(FadeRoute(builder: (context) => TicketsPage())), 158 | child: Icon(Icons.check, size: 36.0), 159 | ), 160 | ), 161 | ); 162 | } 163 | 164 | _initSizeAnimations() { 165 | _planeSizeAnimationController = AnimationController( 166 | duration: const Duration(milliseconds: 340), 167 | vsync: this, 168 | )..addStatusListener((status) { 169 | if (status == AnimationStatus.completed) { 170 | Future.delayed(Duration(milliseconds: 500), () { 171 | widget?.onPlaneFlightStart(); 172 | _planeTravelController.forward(); 173 | }); 174 | Future.delayed(Duration(milliseconds: 700), () { 175 | _dotsAnimationController.forward(); 176 | }); 177 | } 178 | }); 179 | _planeSizeAnimation = 180 | Tween(begin: 60.0, end: 36.0).animate(CurvedAnimation( 181 | parent: _planeSizeAnimationController, 182 | curve: Curves.easeOut, 183 | )); 184 | } 185 | 186 | _initPlaneTravelAnimations() { 187 | _planeTravelController = AnimationController( 188 | vsync: this, 189 | duration: const Duration(milliseconds: 400), 190 | ); 191 | _planeTravelAnimation = CurvedAnimation( 192 | parent: _planeTravelController, 193 | curve: Curves.fastOutSlowIn, 194 | ); 195 | } 196 | 197 | void _initDotAnimations() { 198 | //what part of whole animation takes one dot travel 199 | final double slideDurationInterval = 0.4; 200 | //what are delays between dot animations 201 | final double slideDelayInterval = 0.2; 202 | //at the bottom of the screen 203 | double startingMarginTop = widget.height; 204 | //minimal margin from the top (where first dot will be placed) 205 | double minMarginTop = 206 | _minPlanePaddingTop + _planeSize + 0.5 * (0.8 * FlightStopCard.height); 207 | 208 | for (int i = 0; i < _flightStops.length; i++) { 209 | final start = slideDelayInterval * i; 210 | final end = start + slideDurationInterval; 211 | 212 | double finalMarginTop = minMarginTop + i * (0.8 * FlightStopCard.height); 213 | Animation animation = new Tween( 214 | begin: startingMarginTop, 215 | end: finalMarginTop, 216 | ).animate( 217 | new CurvedAnimation( 218 | parent: _dotsAnimationController, 219 | curve: new Interval(start, end, curve: Curves.easeOut), 220 | ), 221 | ); 222 | _dotPositions.add(animation); 223 | } 224 | } 225 | 226 | void _initDotAnimationController() { 227 | _dotsAnimationController = new AnimationController( 228 | vsync: this, duration: Duration(milliseconds: 500)) 229 | ..addStatusListener((status) { 230 | if (status == AnimationStatus.completed) { 231 | _animateFlightStopCards().then((_) => _animateFab()); 232 | } 233 | }); 234 | } 235 | 236 | Future _animateFlightStopCards() async { 237 | return Future.forEach(_stopKeys, (GlobalKey stopKey) { 238 | return new Future.delayed(Duration(milliseconds: 250), () { 239 | stopKey.currentState.runAnimation(); 240 | }); 241 | }); 242 | } 243 | 244 | void _initFabAnimationController() { 245 | _fabAnimationController = new AnimationController( 246 | vsync: this, duration: Duration(milliseconds: 300)); 247 | _fabAnimation = new CurvedAnimation( 248 | parent: _fabAnimationController, curve: Curves.easeOut); 249 | } 250 | 251 | _animateFab() { 252 | _fabAnimationController.forward(); 253 | } 254 | } 255 | -------------------------------------------------------------------------------- /lib/rounded_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RoundedButton extends StatelessWidget { 4 | final String text; 5 | final bool selected; 6 | final GestureTapCallback onTap; 7 | 8 | const RoundedButton({Key key, this.text, this.selected = false, this.onTap}) 9 | : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | Color backgroundColor = selected ? Colors.white : Colors.transparent; 14 | Color textColor = selected ? Colors.red : Colors.white; 15 | return Expanded( 16 | child: Padding( 17 | padding: const EdgeInsets.all(4.0), 18 | child: new InkWell( 19 | onTap: onTap, 20 | child: new Container( 21 | height: 36.0, 22 | decoration: new BoxDecoration( 23 | color: backgroundColor, 24 | border: new Border.all(color: Colors.white, width: 1.0), 25 | borderRadius: new BorderRadius.circular(30.0), 26 | ), 27 | child: new Center( 28 | child: new Text( 29 | text, 30 | style: new TextStyle(color: textColor), 31 | ), 32 | ), 33 | ), 34 | ), 35 | ), 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/ticket_page/flight_stop_ticket.dart: -------------------------------------------------------------------------------- 1 | class FlightStopTicket { 2 | String from; 3 | String fromShort; 4 | String to; 5 | String toShort; 6 | String flightNumber; 7 | 8 | FlightStopTicket( 9 | this.from, this.fromShort, this.to, this.toShort, this.flightNumber); 10 | } 11 | -------------------------------------------------------------------------------- /lib/ticket_page/ticket_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flight_search/ticket_page/flight_stop_ticket.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter/rendering.dart'; 4 | 5 | class TicketCard extends StatelessWidget { 6 | final FlightStopTicket stop; 7 | 8 | const TicketCard({Key key, this.stop}) : super(key: key); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return ClipPath( 13 | clipper: TicketClipper(10.0), 14 | child: Material( 15 | elevation: 4.0, 16 | shadowColor: Color(0x30E5E5E5), 17 | color: Colors.transparent, 18 | child: ClipPath( 19 | clipper: TicketClipper(12.0), 20 | child: Card( 21 | elevation: 0.0, 22 | margin: const EdgeInsets.all(2.0), 23 | child: _buildCardContent(), 24 | ), 25 | ), 26 | ), 27 | ); 28 | } 29 | 30 | Container _buildCardContent() { 31 | TextStyle airportNameStyle = 32 | new TextStyle(fontSize: 16.0, fontWeight: FontWeight.w600); 33 | TextStyle airportShortNameStyle = 34 | new TextStyle(fontSize: 36.0, fontWeight: FontWeight.w200); 35 | TextStyle flightNumberStyle = 36 | new TextStyle(fontSize: 12.0, fontWeight: FontWeight.w500); 37 | return Container( 38 | height: 104.0, 39 | child: Row( 40 | mainAxisSize: MainAxisSize.max, 41 | children: [ 42 | Expanded( 43 | child: Padding( 44 | padding: const EdgeInsets.only(left: 32.0, top: 16.0), 45 | child: Column( 46 | crossAxisAlignment: CrossAxisAlignment.start, 47 | children: [ 48 | Padding( 49 | padding: const EdgeInsets.only(bottom: 8.0), 50 | child: Text(stop.from, style: airportNameStyle), 51 | ), 52 | Text(stop.fromShort, style: airportShortNameStyle), 53 | ], 54 | ), 55 | ), 56 | ), 57 | Column( 58 | crossAxisAlignment: CrossAxisAlignment.center, 59 | mainAxisAlignment: MainAxisAlignment.center, 60 | children: [ 61 | Padding( 62 | padding: const EdgeInsets.only(bottom: 8.0), 63 | child: Icon( 64 | Icons.airplanemode_active, 65 | color: Colors.red, 66 | ), 67 | ), 68 | Text(stop.flightNumber, style: flightNumberStyle), 69 | ], 70 | ), 71 | Expanded( 72 | child: Padding( 73 | padding: const EdgeInsets.only(left: 40.0, top: 16.0), 74 | child: Column( 75 | crossAxisAlignment: CrossAxisAlignment.start, 76 | children: [ 77 | Padding( 78 | padding: const EdgeInsets.only(bottom: 8.0), 79 | child: Text(stop.to, style: airportNameStyle), 80 | ), 81 | Text(stop.toShort, style: airportShortNameStyle), 82 | ], 83 | ), 84 | ), 85 | ), 86 | ], 87 | ), 88 | ); 89 | } 90 | } 91 | 92 | class TicketClipper extends CustomClipper { 93 | final double radius; 94 | 95 | TicketClipper(this.radius); 96 | 97 | @override 98 | Path getClip(Size size) { 99 | var path = new Path(); 100 | path.lineTo(0.0, size.height); 101 | path.lineTo(size.width, size.height); 102 | path.lineTo(size.width, 0.0); 103 | path.addOval( 104 | Rect.fromCircle(center: Offset(0.0, size.height / 2), radius: radius)); 105 | path.addOval(Rect.fromCircle( 106 | center: Offset(size.width, size.height / 2), radius: radius)); 107 | return path; 108 | } 109 | 110 | @override 111 | bool shouldReclip(CustomClipper oldClipper) => true; 112 | } 113 | -------------------------------------------------------------------------------- /lib/ticket_page/tickets_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flight_search/air_asia_bar.dart'; 2 | import 'package:flight_search/ticket_page/flight_stop_ticket.dart'; 3 | import 'package:flight_search/ticket_page/ticket_card.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class TicketsPage extends StatefulWidget { 7 | @override 8 | _TicketsPageState createState() => _TicketsPageState(); 9 | } 10 | 11 | class _TicketsPageState extends State 12 | with TickerProviderStateMixin { 13 | List stops = [ 14 | new FlightStopTicket("Sahara", "SHE", "Macao", "MAC", "SE2341"), 15 | new FlightStopTicket("Macao", "MAC", "Cape Verde", "CAP", "KU2342"), 16 | new FlightStopTicket("Cape Verde", "CAP", "Ireland", "IRE", "KR3452"), 17 | new FlightStopTicket("Ireland", "IRE", "Sahara", "SHE", "MR4321"), 18 | ]; 19 | AnimationController cardEntranceAnimationController; 20 | List ticketAnimations; 21 | Animation fabAnimation; 22 | 23 | @override 24 | void initState() { 25 | super.initState(); 26 | cardEntranceAnimationController = new AnimationController( 27 | vsync: this, 28 | duration: Duration(milliseconds: 1100), 29 | ); 30 | ticketAnimations = stops.map((stop) { 31 | int index = stops.indexOf(stop); 32 | double start = index * 0.1; 33 | double duration = 0.6; 34 | double end = duration + start; 35 | return new Tween(begin: 800.0, end: 0.0).animate( 36 | new CurvedAnimation( 37 | parent: cardEntranceAnimationController, 38 | curve: new Interval(start, end, curve: Curves.decelerate))); 39 | }).toList(); 40 | fabAnimation = new CurvedAnimation( 41 | parent: cardEntranceAnimationController, 42 | curve: Interval(0.7, 1.0, curve: Curves.decelerate)); 43 | cardEntranceAnimationController.forward(); 44 | } 45 | 46 | @override 47 | void dispose() { 48 | cardEntranceAnimationController.dispose(); 49 | super.dispose(); 50 | } 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return Scaffold( 55 | body: new Stack( 56 | children: [ 57 | AirAsiaBar( 58 | height: 180.0, 59 | ), 60 | Positioned.fill( 61 | top: MediaQuery.of(context).padding.top + 64.0, 62 | child: SingleChildScrollView( 63 | child: new Column( 64 | children: _buildTickets().toList(), 65 | ), 66 | ), 67 | ) 68 | ], 69 | ), 70 | floatingActionButton: _buildFab(), 71 | floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat, 72 | ); 73 | } 74 | 75 | Iterable _buildTickets() { 76 | return stops.map((stop) { 77 | int index = stops.indexOf(stop); 78 | return AnimatedBuilder( 79 | animation: cardEntranceAnimationController, 80 | child: Padding( 81 | padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 8.0), 82 | child: TicketCard(stop: stop), 83 | ), 84 | builder: (context, child) => new Transform.translate( 85 | offset: Offset(0.0, ticketAnimations[index].value), 86 | child: child, 87 | ), 88 | ); 89 | }); 90 | } 91 | 92 | _buildFab() { 93 | return ScaleTransition( 94 | scale: fabAnimation, 95 | child: FloatingActionButton( 96 | onPressed: () => Navigator.of(context).pop(), 97 | child: new Icon(Icons.fingerprint), 98 | ), 99 | ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /lib/typable_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TypableText extends AnimatedWidget { 4 | final String text; 5 | final TextStyle style; 6 | 7 | TypableText({Key key, Animation animation, this.text, this.style}) 8 | : super(key: key, listenable: animation); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final Animation animation = listenable; 13 | int totalLettersCount = text.length; 14 | int currentLettersCount = (totalLettersCount * animation.value).round(); 15 | return Text( 16 | text.substring(0, currentLettersCount), 17 | style: style, 18 | ); 19 | } 20 | } 21 | 22 | class TypeableTextFormField extends StatefulWidget { 23 | final String finalText; 24 | final InputDecoration decoration; 25 | final Animation animation; 26 | 27 | TypeableTextFormField( 28 | {Key key, this.animation, this.finalText, this.decoration}) 29 | : super(key: key); 30 | 31 | @override 32 | TypeableTextFormFieldState createState() { 33 | return new TypeableTextFormFieldState(); 34 | } 35 | } 36 | 37 | class TypeableTextFormFieldState extends State { 38 | final TextEditingController controller = new TextEditingController(); 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return TextFormField( 43 | decoration: widget.decoration, 44 | controller: controller, 45 | ); 46 | } 47 | 48 | @override 49 | void initState() { 50 | super.initState(); 51 | widget.animation.addListener(() { 52 | int totalLettersCount = widget.finalText.length; 53 | int currentLettersCount = 54 | (totalLettersCount * widget.animation.value).round(); 55 | setState(() { 56 | controller.text = widget.finalText.substring(0, currentLettersCount); 57 | }); 58 | }); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "0.31.2-alpha.2" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.4.3" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.7" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.0.3" 32 | charcode: 33 | dependency: transitive 34 | description: 35 | name: charcode 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.1" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.14.6" 46 | convert: 47 | dependency: transitive 48 | description: 49 | name: convert 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "2.0.1" 53 | crypto: 54 | dependency: transitive 55 | description: 56 | name: crypto 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "2.0.3" 60 | csslib: 61 | dependency: transitive 62 | description: 63 | name: csslib 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "0.14.4" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_test: 73 | dependency: "direct dev" 74 | description: flutter 75 | source: sdk 76 | version: "0.0.0" 77 | front_end: 78 | dependency: transitive 79 | description: 80 | name: front_end 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "0.1.0-alpha.12" 84 | glob: 85 | dependency: transitive 86 | description: 87 | name: glob 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "1.1.5" 91 | html: 92 | dependency: transitive 93 | description: 94 | name: html 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "0.13.3" 98 | http: 99 | dependency: transitive 100 | description: 101 | name: http 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "0.11.3+16" 105 | http_multi_server: 106 | dependency: transitive 107 | description: 108 | name: http_multi_server 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "2.0.4" 112 | http_parser: 113 | dependency: transitive 114 | description: 115 | name: http_parser 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "3.1.2" 119 | io: 120 | dependency: transitive 121 | description: 122 | name: io 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "0.3.2+1" 126 | js: 127 | dependency: transitive 128 | description: 129 | name: js 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "0.6.1" 133 | kernel: 134 | dependency: transitive 135 | description: 136 | name: kernel 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "0.3.0-alpha.12" 140 | logging: 141 | dependency: transitive 142 | description: 143 | name: logging 144 | url: "https://pub.dartlang.org" 145 | source: hosted 146 | version: "0.11.3+1" 147 | matcher: 148 | dependency: transitive 149 | description: 150 | name: matcher 151 | url: "https://pub.dartlang.org" 152 | source: hosted 153 | version: "0.12.2+1" 154 | meta: 155 | dependency: transitive 156 | description: 157 | name: meta 158 | url: "https://pub.dartlang.org" 159 | source: hosted 160 | version: "1.1.5" 161 | mime: 162 | dependency: transitive 163 | description: 164 | name: mime 165 | url: "https://pub.dartlang.org" 166 | source: hosted 167 | version: "0.9.6" 168 | multi_server_socket: 169 | dependency: transitive 170 | description: 171 | name: multi_server_socket 172 | url: "https://pub.dartlang.org" 173 | source: hosted 174 | version: "1.0.1" 175 | node_preamble: 176 | dependency: transitive 177 | description: 178 | name: node_preamble 179 | url: "https://pub.dartlang.org" 180 | source: hosted 181 | version: "1.4.1" 182 | package_config: 183 | dependency: transitive 184 | description: 185 | name: package_config 186 | url: "https://pub.dartlang.org" 187 | source: hosted 188 | version: "1.0.3" 189 | package_resolver: 190 | dependency: transitive 191 | description: 192 | name: package_resolver 193 | url: "https://pub.dartlang.org" 194 | source: hosted 195 | version: "1.0.2" 196 | path: 197 | dependency: transitive 198 | description: 199 | name: path 200 | url: "https://pub.dartlang.org" 201 | source: hosted 202 | version: "1.5.1" 203 | plugin: 204 | dependency: transitive 205 | description: 206 | name: plugin 207 | url: "https://pub.dartlang.org" 208 | source: hosted 209 | version: "0.2.0+2" 210 | pool: 211 | dependency: transitive 212 | description: 213 | name: pool 214 | url: "https://pub.dartlang.org" 215 | source: hosted 216 | version: "1.3.4" 217 | pub_semver: 218 | dependency: transitive 219 | description: 220 | name: pub_semver 221 | url: "https://pub.dartlang.org" 222 | source: hosted 223 | version: "1.4.1" 224 | quiver: 225 | dependency: transitive 226 | description: 227 | name: quiver 228 | url: "https://pub.dartlang.org" 229 | source: hosted 230 | version: "0.29.0+1" 231 | shelf: 232 | dependency: transitive 233 | description: 234 | name: shelf 235 | url: "https://pub.dartlang.org" 236 | source: hosted 237 | version: "0.7.3" 238 | shelf_packages_handler: 239 | dependency: transitive 240 | description: 241 | name: shelf_packages_handler 242 | url: "https://pub.dartlang.org" 243 | source: hosted 244 | version: "1.0.3" 245 | shelf_static: 246 | dependency: transitive 247 | description: 248 | name: shelf_static 249 | url: "https://pub.dartlang.org" 250 | source: hosted 251 | version: "0.2.7" 252 | shelf_web_socket: 253 | dependency: transitive 254 | description: 255 | name: shelf_web_socket 256 | url: "https://pub.dartlang.org" 257 | source: hosted 258 | version: "0.2.2" 259 | sky_engine: 260 | dependency: transitive 261 | description: flutter 262 | source: sdk 263 | version: "0.0.99" 264 | source_map_stack_trace: 265 | dependency: transitive 266 | description: 267 | name: source_map_stack_trace 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "1.1.4" 271 | source_maps: 272 | dependency: transitive 273 | description: 274 | name: source_maps 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "0.10.5" 278 | source_span: 279 | dependency: transitive 280 | description: 281 | name: source_span 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "1.4.0" 285 | stack_trace: 286 | dependency: transitive 287 | description: 288 | name: stack_trace 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "1.9.2" 292 | stream_channel: 293 | dependency: transitive 294 | description: 295 | name: stream_channel 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "1.6.6" 299 | string_scanner: 300 | dependency: transitive 301 | description: 302 | name: string_scanner 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "1.0.2" 306 | term_glyph: 307 | dependency: transitive 308 | description: 309 | name: term_glyph 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "1.0.0" 313 | test: 314 | dependency: transitive 315 | description: 316 | name: test 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "0.12.37" 320 | typed_data: 321 | dependency: transitive 322 | description: 323 | name: typed_data 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "1.1.5" 327 | utf: 328 | dependency: transitive 329 | description: 330 | name: utf 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "0.9.0+4" 334 | vector_math: 335 | dependency: transitive 336 | description: 337 | name: vector_math 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "2.0.6" 341 | watcher: 342 | dependency: transitive 343 | description: 344 | name: watcher 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "0.9.7+7" 348 | web_socket_channel: 349 | dependency: transitive 350 | description: 351 | name: web_socket_channel 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "1.0.7" 355 | yaml: 356 | dependency: transitive 357 | description: 358 | name: yaml 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "2.1.13" 362 | sdks: 363 | dart: ">=2.0.0-dev.52.0 <=2.0.0-dev.58.0.flutter-f981f09760" 364 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flight_search 2 | description: A new Flutter project. 3 | 4 | dependencies: 5 | flutter: 6 | sdk: flutter 7 | 8 | dev_dependencies: 9 | flutter_test: 10 | sdk: flutter 11 | 12 | flutter: 13 | uses-material-design: true 14 | fonts: 15 | - family: NothingYouCouldDo 16 | fonts: 17 | - asset: fonts/NothingYouCouldDo.ttf -------------------------------------------------------------------------------- /res/values/strings_en.arb: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /screenshots/design.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/screenshots/design.gif -------------------------------------------------------------------------------- /screenshots/implementation_2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/screenshots/implementation_2.gif -------------------------------------------------------------------------------- /screenshots/original.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iampawan/flutter_ui_challenge_flight_search/af2d74aeebfadee6b1ac6e9d7d4ccb3c10bce454/screenshots/original.gif -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter 3 | // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to 4 | // find child widgets in the widget tree, read text, and verify that the values of widget properties 5 | // are correct. 6 | 7 | import 'package:flutter/material.dart'; 8 | import 'package:flutter_test/flutter_test.dart'; 9 | 10 | import 'package:flight_search/main.dart'; 11 | 12 | void main() { 13 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 14 | // Build our app and trigger a frame. 15 | await tester.pumpWidget(new MyApp()); 16 | 17 | // Verify that our counter starts at 0. 18 | expect(find.text('0'), findsOneWidget); 19 | expect(find.text('1'), findsNothing); 20 | 21 | // Tap the '+' icon and trigger a frame. 22 | await tester.tap(find.byIcon(Icons.add)); 23 | await tester.pump(); 24 | 25 | // Verify that our counter has incremented. 26 | expect(find.text('0'), findsNothing); 27 | expect(find.text('1'), findsOneWidget); 28 | }); 29 | } 30 | --------------------------------------------------------------------------------