├── .gitignore
├── .metadata
├── README.md
├── ScreenCut
├── 1.jpg
└── 2.jpg
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── whu
│ │ │ └── flutterbingocode
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── drawable
│ │ ├── choose_bus_bg.jpg
│ │ └── 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
│ │ ├── strings.xml
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ ├── gradle-wrapper.jar
│ │ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── key.properties
└── settings.gradle
├── assets
├── SpaceDemo.flr
├── choose_bus_bg.jpg
├── choose_buses_bg.jpg
├── ic_launcher.png
├── runLoading.nima
├── runLoading0.png
├── runLoading1.png
├── runLoading2.png
├── runLoading3.png
├── runLoading4.png
├── runLoading5.png
└── show_bus_bg.jpg
├── flutter_bingocode.iml
├── flutter_bingocode_android.iml
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── 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
├── SplashPage.dart
├── bean
│ ├── DirInfo.dart
│ └── StationInfo.dart
├── choosebus
│ ├── ChooseBusPage.dart
│ └── SearchBusPage.dart
├── main.dart
├── manager
│ └── BusManager.dart
├── myinfo
│ ├── FavoriteIcon.dart
│ ├── MyInfoIcon.dart
│ └── MyInfoPage.dart
├── resources
│ ├── colors.dart
│ ├── strings.dart
│ ├── styles.dart
│ └── themes.dart
├── route
│ └── CustomRoute.dart
├── savebus
│ └── SaveBusIcon.dart
├── showbus
│ ├── ShowBusPage.dart
│ └── StationItem.dart
└── util
│ ├── AnimationUtil.dart
│ ├── CommonUtil.dart
│ ├── ConstantUtil.dart
│ └── FileUtil.dart
├── pubspec.lock
├── pubspec.yaml
└── test
├── bingo_test.dart
├── bus_test.dart
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | .dart_tool/
3 |
4 | .packages
5 | .pub/
6 |
7 | build/
8 |
9 | .flutter-plugins
10 | .idea/
--------------------------------------------------------------------------------
/.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 | # flutter_bingocode
2 |
3 | flutter项目实践,实现查询北京实时公交信息,保存公交路线
4 |
5 | ## 查询北京实时公交信息
6 | ### 下载地址
7 | 
8 |
9 | [Android App](https://fir.im/bingobus)
10 |
11 | ### 应用截图
12 | 
13 |
14 | 
15 |
16 | ### 技术博客
17 | [北京实时公交查询](https://juejin.im/post/5c4aea47f265da617831c3e0)
18 |
19 |
20 |
--------------------------------------------------------------------------------
/ScreenCut/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/ScreenCut/1.jpg
--------------------------------------------------------------------------------
/ScreenCut/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/ScreenCut/2.jpg
--------------------------------------------------------------------------------
/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 | def keystorePropertiesFile = rootProject.file("key.properties")
17 | def keystoreProperties = new Properties()
18 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
19 |
20 | android {
21 | compileSdkVersion 28
22 |
23 | lintOptions {
24 | disable 'InvalidPackage'
25 | }
26 |
27 | defaultConfig {
28 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
29 | applicationId "com.whu.flutterbingocode"
30 | minSdkVersion 16
31 | targetSdkVersion 28
32 | versionCode 1
33 | versionName "1.0"
34 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
35 | }
36 |
37 | signingConfigs {
38 | release {
39 | keyAlias keystoreProperties['keyAlias']
40 | keyPassword keystoreProperties['keyPassword']
41 | storeFile file(keystoreProperties['storeFile'])
42 | storePassword keystoreProperties['storePassword']
43 | }
44 | }
45 | buildTypes {
46 | release {
47 | // TODO: Add your own signing config for the release build.
48 | // Signing with the debug keys for now, so `flutter run --release` works.
49 | signingConfig signingConfigs.debug
50 | }
51 | }
52 | }
53 |
54 | flutter {
55 | source '../..'
56 | }
57 |
58 | dependencies {
59 | testImplementation 'junit:junit:4.12'
60 | androidTestImplementation 'com.android.support.test:runner:1.0.1'
61 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
62 | }
63 |
--------------------------------------------------------------------------------
/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/whu/flutterbingocode/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.whu.flutterbingocode;
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/choose_bus_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/android/app/src/main/res/drawable/choose_bus_bg.jpg
--------------------------------------------------------------------------------
/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 北京公交OL
4 |
--------------------------------------------------------------------------------
/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.5.0'
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.enableR8=true
3 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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-5.6.2-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/key.properties:
--------------------------------------------------------------------------------
1 | storePassword=zb82619zb
2 | keyPassword=zb82619zb
3 | keyAlias=key
4 | storeFile=/Users/zengbin/key.jks
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/assets/SpaceDemo.flr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/SpaceDemo.flr
--------------------------------------------------------------------------------
/assets/choose_bus_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/choose_bus_bg.jpg
--------------------------------------------------------------------------------
/assets/choose_buses_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/choose_buses_bg.jpg
--------------------------------------------------------------------------------
/assets/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/ic_launcher.png
--------------------------------------------------------------------------------
/assets/runLoading.nima:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/runLoading.nima
--------------------------------------------------------------------------------
/assets/runLoading0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/runLoading0.png
--------------------------------------------------------------------------------
/assets/runLoading1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/runLoading1.png
--------------------------------------------------------------------------------
/assets/runLoading2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/runLoading2.png
--------------------------------------------------------------------------------
/assets/runLoading3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/runLoading3.png
--------------------------------------------------------------------------------
/assets/runLoading4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/runLoading4.png
--------------------------------------------------------------------------------
/assets/runLoading5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/runLoading5.png
--------------------------------------------------------------------------------
/assets/show_bus_bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/assets/show_bus_bg.jpg
--------------------------------------------------------------------------------
/flutter_bingocode.iml:
--------------------------------------------------------------------------------
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 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/flutter_bingocode_android.iml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/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 "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | pods_ary = []
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) { |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | pods_ary.push({:name => podname, :path => podpath});
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | }
32 | return pods_ary
33 | end
34 |
35 | target 'Runner' do
36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
37 | # referring to absolute paths on developers' machines.
38 | system('rm -rf .symlinks')
39 | system('mkdir -p .symlinks/plugins')
40 |
41 | # Flutter Pods
42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
43 | if generated_xcode_build_settings.empty?
44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
45 | end
46 | generated_xcode_build_settings.map { |p|
47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
48 | symlink = File.join('.symlinks', 'flutter')
49 | File.symlink(File.dirname(p[:path]), symlink)
50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
51 | end
52 | }
53 |
54 | # Plugin Pods
55 | plugin_pods = parse_KV_file('../.flutter-plugins')
56 | plugin_pods.map { |p|
57 | symlink = File.join('.symlinks', 'plugins', p[:name])
58 | File.symlink(p[:path], symlink)
59 | pod p[:name], :path => File.join(symlink, 'ios')
60 | }
61 | end
62 |
63 | post_install do |installer|
64 | installer.pods_project.targets.each do |target|
65 | target.build_configurations.each do |config|
66 | config.build_settings['ENABLE_BITCODE'] = 'NO'
67 | end
68 | end
69 | end
70 |
--------------------------------------------------------------------------------
/ios/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Flutter (1.0.0)
3 | - fluttertoast (0.0.2):
4 | - Flutter
5 | - path_provider (0.0.1):
6 | - Flutter
7 | - shared_preferences (0.0.1):
8 | - Flutter
9 | - url_launcher (0.0.1):
10 | - Flutter
11 |
12 | DEPENDENCIES:
13 | - Flutter (from `.symlinks/flutter/ios-release`)
14 | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`)
15 | - path_provider (from `.symlinks/plugins/path_provider/ios`)
16 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
17 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`)
18 |
19 | EXTERNAL SOURCES:
20 | Flutter:
21 | :path: ".symlinks/flutter/ios-release"
22 | fluttertoast:
23 | :path: ".symlinks/plugins/fluttertoast/ios"
24 | path_provider:
25 | :path: ".symlinks/plugins/path_provider/ios"
26 | shared_preferences:
27 | :path: ".symlinks/plugins/shared_preferences/ios"
28 | url_launcher:
29 | :path: ".symlinks/plugins/url_launcher/ios"
30 |
31 | SPEC CHECKSUMS:
32 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
33 | fluttertoast: 0a20dcbbb8ecfd1a61b6285651ff2d5989d033fb
34 | path_provider: 09407919825bfe3c2deae39453b7a5b44f467873
35 | shared_preferences: 5a1d487c427ee18fcd3ea1f2a131569481834b53
36 | url_launcher: 92b89c1029a0373879933c21642958c874539095
37 |
38 | PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09
39 |
40 | COCOAPODS: 1.5.3
41 |
--------------------------------------------------------------------------------
/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 | 2EC53491C02DA3CAE0865C75 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 17DE5EF7E4CDB9A207BE594B /* libPods-Runner.a */; };
13 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
14 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
15 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
16 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
17 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
19 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
20 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
21 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
22 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXCopyFilesBuildPhase section */
26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
27 | isa = PBXCopyFilesBuildPhase;
28 | buildActionMask = 2147483647;
29 | dstPath = "";
30 | dstSubfolderSpec = 10;
31 | files = (
32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
34 | );
35 | name = "Embed Frameworks";
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXCopyFilesBuildPhase section */
39 |
40 | /* Begin PBXFileReference section */
41 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
42 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
43 | 17DE5EF7E4CDB9A207BE594B /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
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 | 2EC53491C02DA3CAE0865C75 /* libPods-Runner.a in Frameworks */,
69 | );
70 | runOnlyForDeploymentPostprocessing = 0;
71 | };
72 | /* End PBXFrameworksBuildPhase section */
73 |
74 | /* Begin PBXGroup section */
75 | 7035C293E5926025FE0A3E0F /* Pods */ = {
76 | isa = PBXGroup;
77 | children = (
78 | );
79 | name = Pods;
80 | sourceTree = "";
81 | };
82 | 9740EEB11CF90186004384FC /* Flutter */ = {
83 | isa = PBXGroup;
84 | children = (
85 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
86 | 3B80C3931E831B6300D905FE /* App.framework */,
87 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
88 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
89 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
90 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
91 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
92 | );
93 | name = Flutter;
94 | sourceTree = "";
95 | };
96 | 97C146E51CF9000F007C117D = {
97 | isa = PBXGroup;
98 | children = (
99 | 9740EEB11CF90186004384FC /* Flutter */,
100 | 97C146F01CF9000F007C117D /* Runner */,
101 | 97C146EF1CF9000F007C117D /* Products */,
102 | 7035C293E5926025FE0A3E0F /* Pods */,
103 | FE3B6590EB7F0E380A12A4BC /* Frameworks */,
104 | );
105 | sourceTree = "";
106 | };
107 | 97C146EF1CF9000F007C117D /* Products */ = {
108 | isa = PBXGroup;
109 | children = (
110 | 97C146EE1CF9000F007C117D /* Runner.app */,
111 | );
112 | name = Products;
113 | sourceTree = "";
114 | };
115 | 97C146F01CF9000F007C117D /* Runner */ = {
116 | isa = PBXGroup;
117 | children = (
118 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
119 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
120 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
121 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
122 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
123 | 97C147021CF9000F007C117D /* Info.plist */,
124 | 97C146F11CF9000F007C117D /* Supporting Files */,
125 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
126 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
127 | );
128 | path = Runner;
129 | sourceTree = "";
130 | };
131 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
132 | isa = PBXGroup;
133 | children = (
134 | 97C146F21CF9000F007C117D /* main.m */,
135 | );
136 | name = "Supporting Files";
137 | sourceTree = "";
138 | };
139 | FE3B6590EB7F0E380A12A4BC /* Frameworks */ = {
140 | isa = PBXGroup;
141 | children = (
142 | 17DE5EF7E4CDB9A207BE594B /* libPods-Runner.a */,
143 | );
144 | name = Frameworks;
145 | sourceTree = "";
146 | };
147 | /* End PBXGroup section */
148 |
149 | /* Begin PBXNativeTarget section */
150 | 97C146ED1CF9000F007C117D /* Runner */ = {
151 | isa = PBXNativeTarget;
152 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
153 | buildPhases = (
154 | 98C791C0073DECFFA0B3854C /* [CP] Check Pods Manifest.lock */,
155 | 9740EEB61CF901F6004384FC /* Run Script */,
156 | 97C146EA1CF9000F007C117D /* Sources */,
157 | 97C146EB1CF9000F007C117D /* Frameworks */,
158 | 97C146EC1CF9000F007C117D /* Resources */,
159 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
160 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
161 | 4B6EE528A38496CBED59D151 /* [CP] Embed Pods Frameworks */,
162 | );
163 | buildRules = (
164 | );
165 | dependencies = (
166 | );
167 | name = Runner;
168 | productName = Runner;
169 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
170 | productType = "com.apple.product-type.application";
171 | };
172 | /* End PBXNativeTarget section */
173 |
174 | /* Begin PBXProject section */
175 | 97C146E61CF9000F007C117D /* Project object */ = {
176 | isa = PBXProject;
177 | attributes = {
178 | LastUpgradeCheck = 1010;
179 | ORGANIZATIONNAME = "The Chromium Authors";
180 | TargetAttributes = {
181 | 97C146ED1CF9000F007C117D = {
182 | CreatedOnToolsVersion = 7.3.1;
183 | ProvisioningStyle = Automatic;
184 | };
185 | };
186 | };
187 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
188 | compatibilityVersion = "Xcode 3.2";
189 | developmentRegion = English;
190 | hasScannedForEncodings = 0;
191 | knownRegions = (
192 | en,
193 | Base,
194 | );
195 | mainGroup = 97C146E51CF9000F007C117D;
196 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
197 | projectDirPath = "";
198 | projectRoot = "";
199 | targets = (
200 | 97C146ED1CF9000F007C117D /* Runner */,
201 | );
202 | };
203 | /* End PBXProject section */
204 |
205 | /* Begin PBXResourcesBuildPhase section */
206 | 97C146EC1CF9000F007C117D /* Resources */ = {
207 | isa = PBXResourcesBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
211 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
212 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
213 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
214 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | };
218 | /* End PBXResourcesBuildPhase section */
219 |
220 | /* Begin PBXShellScriptBuildPhase section */
221 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
222 | isa = PBXShellScriptBuildPhase;
223 | buildActionMask = 2147483647;
224 | files = (
225 | );
226 | inputPaths = (
227 | );
228 | name = "Thin Binary";
229 | outputPaths = (
230 | );
231 | runOnlyForDeploymentPostprocessing = 0;
232 | shellPath = /bin/sh;
233 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
234 | };
235 | 4B6EE528A38496CBED59D151 /* [CP] Embed Pods Frameworks */ = {
236 | isa = PBXShellScriptBuildPhase;
237 | buildActionMask = 2147483647;
238 | files = (
239 | );
240 | inputPaths = (
241 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
242 | "${PODS_ROOT}/../.symlinks/flutter/ios-release/Flutter.framework",
243 | );
244 | name = "[CP] Embed Pods Frameworks";
245 | outputPaths = (
246 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
247 | );
248 | runOnlyForDeploymentPostprocessing = 0;
249 | shellPath = /bin/sh;
250 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
251 | showEnvVarsInLog = 0;
252 | };
253 | 9740EEB61CF901F6004384FC /* Run Script */ = {
254 | isa = PBXShellScriptBuildPhase;
255 | buildActionMask = 2147483647;
256 | files = (
257 | );
258 | inputPaths = (
259 | );
260 | name = "Run Script";
261 | outputPaths = (
262 | );
263 | runOnlyForDeploymentPostprocessing = 0;
264 | shellPath = /bin/sh;
265 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
266 | };
267 | 98C791C0073DECFFA0B3854C /* [CP] Check Pods Manifest.lock */ = {
268 | isa = PBXShellScriptBuildPhase;
269 | buildActionMask = 2147483647;
270 | files = (
271 | );
272 | inputPaths = (
273 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
274 | "${PODS_ROOT}/Manifest.lock",
275 | );
276 | name = "[CP] Check Pods Manifest.lock";
277 | outputPaths = (
278 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
279 | );
280 | runOnlyForDeploymentPostprocessing = 0;
281 | shellPath = /bin/sh;
282 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
283 | showEnvVarsInLog = 0;
284 | };
285 | /* End PBXShellScriptBuildPhase section */
286 |
287 | /* Begin PBXSourcesBuildPhase section */
288 | 97C146EA1CF9000F007C117D /* Sources */ = {
289 | isa = PBXSourcesBuildPhase;
290 | buildActionMask = 2147483647;
291 | files = (
292 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
293 | 97C146F31CF9000F007C117D /* main.m in Sources */,
294 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
295 | );
296 | runOnlyForDeploymentPostprocessing = 0;
297 | };
298 | /* End PBXSourcesBuildPhase section */
299 |
300 | /* Begin PBXVariantGroup section */
301 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
302 | isa = PBXVariantGroup;
303 | children = (
304 | 97C146FB1CF9000F007C117D /* Base */,
305 | );
306 | name = Main.storyboard;
307 | sourceTree = "";
308 | };
309 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
310 | isa = PBXVariantGroup;
311 | children = (
312 | 97C147001CF9000F007C117D /* Base */,
313 | );
314 | name = LaunchScreen.storyboard;
315 | sourceTree = "";
316 | };
317 | /* End PBXVariantGroup section */
318 |
319 | /* Begin XCBuildConfiguration section */
320 | 97C147031CF9000F007C117D /* Debug */ = {
321 | isa = XCBuildConfiguration;
322 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.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_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
335 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
336 | CLANG_WARN_EMPTY_BODY = YES;
337 | CLANG_WARN_ENUM_CONVERSION = YES;
338 | CLANG_WARN_INFINITE_RECURSION = YES;
339 | CLANG_WARN_INT_CONVERSION = YES;
340 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
341 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
342 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
343 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
344 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
345 | CLANG_WARN_STRICT_PROTOTYPES = YES;
346 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
347 | CLANG_WARN_UNREACHABLE_CODE = YES;
348 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
349 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
350 | COPY_PHASE_STRIP = NO;
351 | DEBUG_INFORMATION_FORMAT = dwarf;
352 | ENABLE_STRICT_OBJC_MSGSEND = YES;
353 | ENABLE_TESTABILITY = YES;
354 | GCC_C_LANGUAGE_STANDARD = gnu99;
355 | GCC_DYNAMIC_NO_PIC = NO;
356 | GCC_NO_COMMON_BLOCKS = YES;
357 | GCC_OPTIMIZATION_LEVEL = 0;
358 | GCC_PREPROCESSOR_DEFINITIONS = (
359 | "DEBUG=1",
360 | "$(inherited)",
361 | );
362 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
363 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
364 | GCC_WARN_UNDECLARED_SELECTOR = YES;
365 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
366 | GCC_WARN_UNUSED_FUNCTION = YES;
367 | GCC_WARN_UNUSED_VARIABLE = YES;
368 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
369 | MTL_ENABLE_DEBUG_INFO = YES;
370 | ONLY_ACTIVE_ARCH = YES;
371 | SDKROOT = iphoneos;
372 | TARGETED_DEVICE_FAMILY = "1,2";
373 | };
374 | name = Debug;
375 | };
376 | 97C147041CF9000F007C117D /* Release */ = {
377 | isa = XCBuildConfiguration;
378 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
379 | buildSettings = {
380 | ALWAYS_SEARCH_USER_PATHS = NO;
381 | CLANG_ANALYZER_NONNULL = YES;
382 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
383 | CLANG_CXX_LIBRARY = "libc++";
384 | CLANG_ENABLE_MODULES = YES;
385 | CLANG_ENABLE_OBJC_ARC = YES;
386 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
387 | CLANG_WARN_BOOL_CONVERSION = YES;
388 | CLANG_WARN_COMMA = YES;
389 | CLANG_WARN_CONSTANT_CONVERSION = YES;
390 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
391 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
392 | CLANG_WARN_EMPTY_BODY = YES;
393 | CLANG_WARN_ENUM_CONVERSION = YES;
394 | CLANG_WARN_INFINITE_RECURSION = YES;
395 | CLANG_WARN_INT_CONVERSION = YES;
396 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
397 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
398 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
399 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
400 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
401 | CLANG_WARN_STRICT_PROTOTYPES = YES;
402 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
403 | CLANG_WARN_UNREACHABLE_CODE = YES;
404 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
405 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
406 | COPY_PHASE_STRIP = NO;
407 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
408 | ENABLE_NS_ASSERTIONS = NO;
409 | ENABLE_STRICT_OBJC_MSGSEND = YES;
410 | GCC_C_LANGUAGE_STANDARD = gnu99;
411 | GCC_NO_COMMON_BLOCKS = YES;
412 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
413 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
414 | GCC_WARN_UNDECLARED_SELECTOR = YES;
415 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
416 | GCC_WARN_UNUSED_FUNCTION = YES;
417 | GCC_WARN_UNUSED_VARIABLE = YES;
418 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
419 | MTL_ENABLE_DEBUG_INFO = NO;
420 | SDKROOT = iphoneos;
421 | TARGETED_DEVICE_FAMILY = "1,2";
422 | VALIDATE_PRODUCT = YES;
423 | };
424 | name = Release;
425 | };
426 | 97C147061CF9000F007C117D /* Debug */ = {
427 | isa = XCBuildConfiguration;
428 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
429 | buildSettings = {
430 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
431 | CODE_SIGN_IDENTITY = "iPhone Developer";
432 | CODE_SIGN_STYLE = Automatic;
433 | CURRENT_PROJECT_VERSION = 1;
434 | DEVELOPMENT_TEAM = "";
435 | ENABLE_BITCODE = NO;
436 | FRAMEWORK_SEARCH_PATHS = (
437 | "$(inherited)",
438 | "$(PROJECT_DIR)/Flutter",
439 | );
440 | INFOPLIST_FILE = Runner/Info.plist;
441 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
442 | LIBRARY_SEARCH_PATHS = (
443 | "$(inherited)",
444 | "$(PROJECT_DIR)/Flutter",
445 | );
446 | PRODUCT_BUNDLE_IDENTIFIER = com.whu.flutterBingocode;
447 | PRODUCT_NAME = "$(TARGET_NAME)";
448 | PROVISIONING_PROFILE_SPECIFIER = "";
449 | VERSIONING_SYSTEM = "apple-generic";
450 | };
451 | name = Debug;
452 | };
453 | 97C147071CF9000F007C117D /* Release */ = {
454 | isa = XCBuildConfiguration;
455 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
456 | buildSettings = {
457 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
458 | CODE_SIGN_IDENTITY = "iPhone Developer";
459 | CODE_SIGN_STYLE = Automatic;
460 | CURRENT_PROJECT_VERSION = 1;
461 | DEVELOPMENT_TEAM = "";
462 | ENABLE_BITCODE = NO;
463 | FRAMEWORK_SEARCH_PATHS = (
464 | "$(inherited)",
465 | "$(PROJECT_DIR)/Flutter",
466 | );
467 | INFOPLIST_FILE = Runner/Info.plist;
468 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
469 | LIBRARY_SEARCH_PATHS = (
470 | "$(inherited)",
471 | "$(PROJECT_DIR)/Flutter",
472 | );
473 | PRODUCT_BUNDLE_IDENTIFIER = com.whu.flutterBingocode;
474 | PRODUCT_NAME = "$(TARGET_NAME)";
475 | PROVISIONING_PROFILE_SPECIFIER = "";
476 | VERSIONING_SYSTEM = "apple-generic";
477 | };
478 | name = Release;
479 | };
480 | /* End XCBuildConfiguration section */
481 |
482 | /* Begin XCConfigurationList section */
483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
484 | isa = XCConfigurationList;
485 | buildConfigurations = (
486 | 97C147031CF9000F007C117D /* Debug */,
487 | 97C147041CF9000F007C117D /* Release */,
488 | );
489 | defaultConfigurationIsVisible = 0;
490 | defaultConfigurationName = Release;
491 | };
492 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
493 | isa = XCConfigurationList;
494 | buildConfigurations = (
495 | 97C147061CF9000F007C117D /* Debug */,
496 | 97C147071CF9000F007C117D /* Release */,
497 | );
498 | defaultConfigurationIsVisible = 0;
499 | defaultConfigurationName = Release;
500 | };
501 | /* End XCConfigurationList section */
502 | };
503 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
504 | }
505 |
--------------------------------------------------------------------------------
/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 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildSystemType
6 | Original
7 |
8 |
9 |
--------------------------------------------------------------------------------
/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bingocode/flutter_bingocode/aa447e54f55abc4b17941e3190cad34aadc64c31/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 | 北京公交OL
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/SplashPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_bingocode/choosebus/ChooseBusPage.dart';
3 | import 'package:flutter_bingocode/route/CustomRoute.dart';
4 | import 'package:flutter_bingocode/util/AnimationUtil.dart';
5 |
6 | class SplashPage extends StatefulWidget {
7 | @override
8 | State createState() {
9 | // TODO: implement createState
10 | return SplashPageState();
11 | }
12 | }
13 |
14 | class SplashPageState extends State
15 | with SingleTickerProviderStateMixin {
16 | AnimationController animationController;
17 | Animation animation;
18 |
19 | @override
20 | void initState() {
21 | super.initState();
22 | animationController =
23 | AnimationController(vsync: this, duration: Duration(seconds: 2));
24 | animation = Tween(begin: 0.0, end: 100.0).animate(animationController);
25 | animationController.forward(); //启动动画
26 | animation.addStatusListener((status) {
27 | if (status == AnimationStatus.completed ||
28 | status == AnimationStatus.dismissed) {
29 | Navigator.pushReplacement(
30 | context, SlideRoute(ChooseBusPage(), SlideRoute.DOWN));
31 | }
32 | });
33 | }
34 |
35 | @override
36 | Widget build(BuildContext context) {
37 | // TODO: implement build
38 | return Container(
39 | child: Center(
40 | child: TransitionAnimation(
41 | child: Image.asset(('assets/ic_launcher.png')),
42 | animation: animation),
43 | ),
44 | );
45 | }
46 |
47 | @override
48 | void dispose() {
49 | animationController.dispose();
50 | super.dispose();
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/lib/bean/DirInfo.dart:
--------------------------------------------------------------------------------
1 | class DirInfo {
2 | String direction;
3 | String directionId;
4 |
5 | DirInfo(this.direction, this.directionId);
6 |
7 | }
--------------------------------------------------------------------------------
/lib/bean/StationInfo.dart:
--------------------------------------------------------------------------------
1 | class StationInfo {
2 | String name;
3 | String index;
4 | // 当前站有公交
5 | var hasBus = false;
6 | // 有公交正在驶往该站
7 | var hasNextBus = false;
8 |
9 | var isSelfStop = false;
10 | StationInfo(this.name, this.index);
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/lib/choosebus/ChooseBusPage.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_bingocode/bean/DirInfo.dart';
5 | import 'package:flutter_bingocode/bean/StationInfo.dart';
6 | import 'package:flutter_bingocode/choosebus/SearchBusPage.dart';
7 | import 'package:flutter_bingocode/manager/BusManager.dart';
8 | import 'package:flutter_bingocode/myinfo/MyInfoIcon.dart';
9 | import 'package:flutter_bingocode/resources/strings.dart';
10 | import 'package:flutter_bingocode/resources/styles.dart';
11 | import 'package:flutter_bingocode/route/CustomRoute.dart';
12 | import 'package:flutter_bingocode/savebus/SaveBusIcon.dart';
13 | import 'package:flutter_bingocode/showbus/ShowBusPage.dart';
14 | import 'package:flutter_bingocode/util/CommonUtil.dart';
15 | import 'package:flutter_bingocode/util/ConstantUtil.dart';
16 | import 'package:nima/nima_actor.dart';
17 |
18 | class ChooseBusPage extends StatefulWidget {
19 | @override
20 | State createState() {
21 | return ChooseBusState();
22 | }
23 | }
24 |
25 | class ChooseBusState extends State {
26 | static const STEP_COUNT = 3;
27 | static const STEP_CHOOSE_BUS = 0;
28 | static const STEP_CHOOSE_DIR = 1;
29 | static const STEP_CHOOSE_STATION = 2;
30 | final Utf8Decoder decoder = new Utf8Decoder();
31 | BusManager _busManager;
32 | UpdateCallBack> updateBusesCallBack;
33 | UpdateCallBack> updateDirCallBack;
34 | UpdateCallBack> updateStationsCallBack;
35 | UpdateCallBack> queryStationsCallBack;
36 | int currentStep = STEP_CHOOSE_BUS;
37 | bool hasDirSaved = true;
38 | bool hasStationSaved = true;
39 |
40 | @override
41 | void initState() {
42 | super.initState();
43 | _busManager = BusManager();
44 | updateBusesCallBack = (List buses) {
45 | showSearch(context: context, delegate: searchBarDelegate(buses))
46 | .then((String bus) {
47 | setState(() {
48 | if (bus != null && bus != _busManager.busLine) {
49 | _busManager.busLine = bus;
50 | }
51 | });
52 | });
53 | };
54 | updateDirCallBack = (List dirinfos) {
55 | setState(() {
56 | currentStep = STEP_CHOOSE_DIR;
57 | if (hasDirSaved) {
58 | for (DirInfo info in dirinfos) {
59 | if (info.directionId == _busManager.busDirId) {
60 | _busManager.busDir = info;
61 | if (hasStationSaved) {
62 | _busManager.getStationList().then(updateStationsCallBack);
63 | }
64 | }
65 | }
66 | }
67 | hasDirSaved = false;
68 | });
69 | };
70 | updateStationsCallBack = (List staionInfos) {
71 | setState(() {
72 | currentStep = STEP_CHOOSE_STATION;
73 | if (hasStationSaved) {
74 | for (StationInfo info in staionInfos) {
75 | if (info.index == _busManager.busSelfStopId) {
76 | _busManager.busSelfStop = info;
77 | }
78 | }
79 | }
80 | hasStationSaved = false;
81 | });
82 | };
83 |
84 | queryStationsCallBack = (List dirinfos) {
85 | print("query onLine busInfo");
86 | Navigator.push(context, FadeRoute(ShowBusPage()));
87 | };
88 | _busManager.getSavedBusLine().then((Map savedMap) {
89 | setState(() {
90 | _busManager.busLine = savedMap[KeyConstant.keyBusLine];
91 | _busManager.busDirId = savedMap[KeyConstant.keyBusDir];
92 | _busManager.busSelfStopId = savedMap[KeyConstant.keyBusStation];
93 | hasDirSaved = _busManager.busDirId != null;
94 | hasStationSaved = _busManager.busSelfStopId != null;
95 | if (hasDirSaved) {
96 | _busManager.getDirList().then(updateDirCallBack);
97 | }
98 | });
99 | });
100 | }
101 |
102 | @override
103 | Widget build(BuildContext context) {
104 | return MaterialApp(
105 | title: 'Flutter Demo',
106 | debugShowCheckedModeBanner: false,
107 | theme: ThemeData(
108 | backgroundColor: Colors.transparent,
109 | primarySwatch: Colors.blue,
110 | ),
111 | home: Scaffold(
112 | body: Stack(
113 | children: [
114 | buildContainer(context),
115 | Container(
116 | alignment: Alignment.bottomLeft,
117 | margin: EdgeInsets.fromLTRB(16, 0, 0, 16),
118 | child: MyInfoIcon(),
119 | )
120 | ],
121 | ),
122 | floatingActionButton: SaveBusIcon(),
123 | ));
124 | }
125 |
126 | Container buildContainer(BuildContext context) {
127 | return Container(
128 | decoration: BoxDecoration(
129 | image: DecorationImage(
130 | image: AssetImage('assets/choose_buses_bg.jpg'),
131 | fit: BoxFit.fitHeight)),
132 | child: Center(
133 | child: Column(
134 | mainAxisAlignment: MainAxisAlignment.center,
135 | children: [
136 | Container(
137 | width: 100,
138 | height: 100,
139 | child: currentStep >= STEP_CHOOSE_DIR
140 | ? NimaActor('assets/runLoading.nima',
141 | fit: BoxFit.scaleDown, animation: 'Run')
142 | : NimaActor('assets/runLoading.nima', fit: BoxFit.scaleDown),
143 | ),
144 | (hasDirSaved || hasStationSaved)
145 | ? Container()
146 | : Stepper(
147 | currentStep: this.currentStep,
148 | steps: [
149 | new Step(
150 | // Title of the Step
151 | title: new Text(
152 | _busManager.busLine == null
153 | ? StringRes.chooseBus
154 | : StringRes.chooseBus +
155 | ': ${_busManager.busLine}',
156 | softWrap: false,
157 | overflow: TextOverflow.ellipsis,
158 | style: StyleRes.chooseBusButtonTextStyle),
159 | content: _getChooseBusItem(),
160 | isActive: currentStep >= STEP_CHOOSE_BUS),
161 | new Step(
162 | title: new Text(
163 | _busManager.busDir == null
164 | ? StringRes.chooseDir
165 | : StringRes.chooseDir +
166 | ': ${_busManager.busDir.direction}',
167 | softWrap: false,
168 | overflow: TextOverflow.ellipsis,
169 | style: StyleRes.chooseBusButtonTextStyle),
170 | content: _getChooseDirItem(),
171 | // You can change the style of the step icon i.e number, editing, etc.
172 | isActive: currentStep >= STEP_CHOOSE_DIR),
173 | new Step(
174 | title: new Text(
175 | _busManager.busSelfStop == null
176 | ? StringRes.chooseStation
177 | : StringRes.chooseStation +
178 | ': ${_busManager.busSelfStop.name}',
179 | softWrap: false,
180 | overflow: TextOverflow.ellipsis,
181 | style: StyleRes.chooseBusButtonTextStyle),
182 | content: _getChooseStationItem(),
183 | isActive: currentStep >= STEP_CHOOSE_STATION),
184 | ],
185 | controlsBuilder: (BuildContext context,
186 | {VoidCallback onStepContinue,
187 | VoidCallback onStepCancel}) {
188 | return Row(
189 | children: [
190 | FlatButton(
191 | onPressed: onStepContinue,
192 | child: Text(
193 | currentStep < STEP_CHOOSE_STATION
194 | ? StringRes.next_step
195 | : StringRes.queryBus,
196 | style: StyleRes.saveBusButtonTextStyle),
197 | ),
198 | FlatButton(
199 | onPressed: onStepCancel,
200 | child: Text(StringRes.concel,
201 | style: StyleRes.chooseBusButtonTextStyle),
202 | ),
203 | ],
204 | );
205 | },
206 | type: StepperType.vertical,
207 | onStepCancel: () {
208 | setState(() {
209 | switch (currentStep) {
210 | case STEP_CHOOSE_BUS:
211 | _busManager.busLine = null;
212 | currentStep = 0;
213 | break;
214 | case STEP_CHOOSE_DIR:
215 | _busManager.dirInfoList.clear();
216 | _busManager.busDir = null;
217 | currentStep = currentStep - 1;
218 | break;
219 | case STEP_CHOOSE_STATION:
220 | _busManager.stationInfoList.clear();
221 | _busManager.busSelfStop = null;
222 | currentStep = currentStep - 1;
223 | break;
224 | }
225 | });
226 | print("onStepCancel : " + currentStep.toString());
227 | },
228 | onStepContinue: () {
229 | String msg;
230 | if (_busManager.busLine == null) {
231 | msg = StringRes.choose_bus_hint;
232 | } else if (_busManager.busDir == null) {
233 | msg = StringRes.choose_dir_hint;
234 | } else if (_busManager.busSelfStop == null) {
235 | msg = StringRes.choose_selfStop_hint;
236 | }
237 | switch (currentStep) {
238 | case STEP_CHOOSE_BUS:
239 | if (_busManager.busLine != null) {
240 | //todo 加载进度
241 | setState(() {
242 | _busManager.getDirList().then(updateDirCallBack);
243 | });
244 | } else {
245 | CommonUtil.toast(msg);
246 | }
247 | break;
248 | case STEP_CHOOSE_DIR:
249 | if (_busManager.busDir != null) {
250 | //todo 加载进度
251 | setState(() {
252 | _busManager
253 | .getStationList()
254 | .then(updateStationsCallBack);
255 | });
256 | } else {
257 | CommonUtil.toast(msg);
258 | }
259 | break;
260 | case STEP_CHOOSE_STATION:
261 | if (msg == null) {
262 | //todo 加载进度
263 | setState(() {
264 | _busManager
265 | .getOnlineBusInfo(context)
266 | .then(queryStationsCallBack);
267 | });
268 | } else {
269 | CommonUtil.toast(msg);
270 | }
271 | break;
272 | }
273 | print("onStepContinue : " + currentStep.toString());
274 | },
275 | ),
276 | ],
277 | )));
278 | }
279 |
280 | Widget _getChooseBusItem() {
281 | return MaterialButton(
282 | color: Colors.blueAccent,
283 | child: _busManager.busLine == null
284 | ? Text(StringRes.chooseBus, style: StyleRes.chooseBusButtonTextStyle)
285 | : Text(_busManager.busLine, style: StyleRes.chooseBusButtonTextStyle),
286 | onPressed: () {
287 | setState(() {
288 | _busManager.getBusList().then(updateBusesCallBack);
289 | });
290 | },
291 | );
292 | }
293 |
294 | Widget _getChooseDirItem() {
295 | return MaterialButton(
296 | color: Colors.blueAccent,
297 | child: _busManager.busDir == null
298 | ? Text(StringRes.chooseDir,
299 | style: StyleRes.chooseBusButtonTextStyle)
300 | : Text(_busManager.busDir.direction,
301 | style: StyleRes.chooseBusButtonTextStyle),
302 | onPressed: () {
303 | showDialog(
304 | context: context,
305 | builder: (BuildContext context) {
306 | return SimpleDialog(
307 | title: Text(StringRes.chooseDir),
308 | children: _getBusDirWidgets(context),
309 | );
310 | });
311 | });
312 | }
313 |
314 | Widget _getChooseStationItem() {
315 | return MaterialButton(
316 | color: Colors.blueAccent,
317 | child: _busManager.busSelfStop == null
318 | ? Text(StringRes.chooseStation,
319 | style: StyleRes.chooseBusButtonTextStyle)
320 | : Text(_busManager.busSelfStop.name,
321 | style: StyleRes.chooseBusButtonTextStyle),
322 | onPressed: () {
323 | showDialog(
324 | context: context,
325 | builder: (BuildContext context) {
326 | return SimpleDialog(
327 | title: Text(StringRes.chooseStation),
328 | children: _getBusStationWidgets(context),
329 | );
330 | });
331 | });
332 | }
333 |
334 | List _getBusDirWidgets(BuildContext context) {
335 | var busLineWeights = [];
336 | for (DirInfo dir in _busManager.dirInfoList) {
337 | busLineWeights.add(SimpleDialogOption(
338 | child: Text(dir.direction),
339 | onPressed: () {
340 | Navigator.of(context).pop();
341 | print('chooseDir${dir.direction}');
342 | setState(() {
343 | _busManager.busDir = dir;
344 | });
345 | },
346 | ));
347 | }
348 | return busLineWeights;
349 | }
350 |
351 | List _getBusStationWidgets(BuildContext context) {
352 | var busLineWeights = [];
353 | for (StationInfo station in _busManager.stationInfoList) {
354 | busLineWeights.add(SimpleDialogOption(
355 | child: Text(station.name),
356 | onPressed: () {
357 | Navigator.of(context).pop();
358 | print('chooseStation${station.name}');
359 | setState(() {
360 | _busManager.busSelfStop = station;
361 | });
362 | },
363 | ));
364 | }
365 | return busLineWeights;
366 | }
367 | }
368 |
--------------------------------------------------------------------------------
/lib/choosebus/SearchBusPage.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class searchBarDelegate extends SearchDelegate {
4 | List searchList;
5 |
6 | searchBarDelegate(this.searchList);
7 |
8 | @override
9 | List buildActions(BuildContext context) {
10 | return [
11 | IconButton(
12 | icon: Icon(Icons.clear),
13 | onPressed: () => query = "",
14 | )
15 | ];
16 | }
17 |
18 | @override
19 | Widget buildLeading(BuildContext context) {
20 | return IconButton(
21 | icon: AnimatedIcon(
22 | icon: AnimatedIcons.menu_arrow, progress: transitionAnimation),
23 | onPressed: () => close(context, null));
24 | }
25 |
26 | @override
27 | Widget buildResults(BuildContext context) {
28 | return _buildSearchItems();
29 | }
30 |
31 | @override
32 | Widget buildSuggestions(BuildContext context) {
33 | return _buildSearchItems();
34 | }
35 |
36 | Widget _buildSearchItems() {
37 | final suggestionList = query.isEmpty
38 | ? []
39 | : searchList.where((input) => input.startsWith(query)).toList();
40 | return ListView.builder(
41 | itemCount: suggestionList.length,
42 | itemBuilder: (context, index) => ListTile(
43 | title: InkWell(
44 | onTap: () {
45 | close(context, suggestionList[index]);
46 | },
47 | child: RichText(
48 | text: TextSpan(
49 | text: suggestionList[index].substring(0, query.length),
50 | style: TextStyle(
51 | color: Colors.black, fontWeight: FontWeight.bold),
52 | children: [
53 | TextSpan(
54 | text: suggestionList[index].substring(query.length),
55 | style: TextStyle(color: Colors.grey))
56 | ])))));
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:flutter_bingocode/SplashPage.dart';
4 |
5 | void main() {
6 | // 开启布局边界
7 | //debugPaintSizeEnabled=true;
8 | // 沉浸式状态栏
9 | //SystemChrome.setEnabledSystemUIOverlays([]);
10 | // 强制竖屏
11 | runApp(new MyApp());
12 | }
13 |
14 | class MyApp extends StatelessWidget {
15 | // This widget is the root of your application.
16 | @override
17 | Widget build(BuildContext context) {
18 | return new MaterialApp(
19 | title: 'Flutter Demo',
20 | debugShowCheckedModeBanner: false,
21 | theme: new ThemeData(
22 | primarySwatch: Colors.blue, backgroundColor: Colors.transparent),
23 | home: Scaffold(
24 | body: SplashPage(),
25 | ),
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/manager/BusManager.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_bingocode/bean/DirInfo.dart';
5 | import 'package:flutter_bingocode/bean/StationInfo.dart';
6 | import 'package:flutter_bingocode/resources/strings.dart';
7 | import 'package:flutter_bingocode/util/CommonUtil.dart';
8 | import 'package:flutter_bingocode/util/ConstantUtil.dart';
9 | import 'package:flutter_bingocode/util/FileUtil.dart';
10 | import 'package:html/dom.dart' as dom;
11 | import 'package:html/parser.dart' show parse;
12 | import 'package:http/http.dart' as http;
13 | import 'package:shared_preferences/shared_preferences.dart';
14 |
15 | typedef UpdateCallBack = Function(T data);
16 |
17 | class BusManager {
18 | // 工厂模式
19 | factory BusManager() => _getInstance();
20 |
21 | static BusManager get instance => _getInstance();
22 | static BusManager _instance;
23 | final Utf8Decoder decoder = new Utf8Decoder();
24 | var busLineList = [];
25 | var dirInfoList = [];
26 | var stationInfoList = [];
27 | String busLine;
28 | String busDirId;
29 | String busSelfStopId;
30 | DirInfo busDir;
31 | StationInfo busSelfStop;
32 |
33 | BusManager._internal() {
34 | // 初始化
35 | }
36 |
37 | static BusManager _getInstance() {
38 | if (_instance == null) {
39 | _instance = new BusManager._internal();
40 | }
41 | return _instance;
42 | }
43 |
44 | Future