├── .DS_Store
├── .gitignore
├── .vscode
└── launch.json
├── LICENSE
├── README.md
└── flutter_learn
├── .gitignore
├── .metadata
├── .vscode
└── settings.json
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── xuexiang
│ │ │ │ └── flutterLearn
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ ├── ic_splash_app_logo.png
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ ├── ic_launcher.png
│ │ │ ├── ic_splash_app_logo.png
│ │ │ └── ic_splash_company_logo_xuexiang.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── repos.gradle
└── settings.gradle
├── apk
└── app-release.apk
├── art
├── 1.png
├── 2.png
├── 3.png
├── 4.png
├── 5.png
├── 6.png
├── 7.png
├── 8.png
├── 9.png
├── alipay.jpeg
├── demo.gif
├── download_github.png
├── download_pugongying.png
└── wxpay.jpeg
├── assets
├── app.db
├── fonts
│ └── iconfont.ttf
├── images
│ ├── bg_update_top.png
│ ├── flutter.png
│ ├── food01.jpeg
│ ├── food02.jpeg
│ ├── food03.jpeg
│ ├── food04.jpeg
│ ├── food05.jpeg
│ ├── food06.jpeg
│ ├── normal_user_icon.png
│ ├── scenery.jpg
│ ├── timg.jpeg
│ ├── xupdate_bg_app_top.png
│ └── xupdate_ic_close.png
└── json
│ ├── app_version.json
│ ├── picker1.json
│ └── picker2.json
├── i10n-arb
├── intl_messages.arb
└── intl_zh_CN.arb
├── intl.sh
├── ios
├── Flutter
│ ├── .last_build_id
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ ├── Flutter.podspec
│ └── Release.xcconfig
├── Podfile
├── Podfile.lock
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── Runner
│ ├── AppDelegate.swift
│ ├── 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
│ ├── Runner-Bridging-Header.h
│ └── Runner.entitlements
├── jsonapi
└── update_api.json
├── lib
├── home.dart
├── i10n
│ ├── localization_intl.dart
│ ├── messages_all.dart
│ ├── messages_messages.dart
│ └── messages_zh_CN.dart
├── init
│ ├── app_init.dart
│ ├── normal_app.dart
│ └── splash.dart
├── main.dart
├── model
│ └── sql
│ │ ├── app_info.dart
│ │ └── user_info.dart
├── page
│ ├── expand
│ │ ├── badge.dart
│ │ ├── city_picker.dart
│ │ ├── date_picker.dart
│ │ ├── download.dart
│ │ ├── iconfont.dart
│ │ ├── image_picker.dart
│ │ ├── multi_image_picker.dart
│ │ ├── picker.dart
│ │ ├── qrcode.dart
│ │ ├── refresh
│ │ │ ├── ballpulse_refresh.dart
│ │ │ ├── basic_refresh.dart
│ │ │ ├── material_refresh.dart
│ │ │ └── user_profile.dart
│ │ ├── spinkit.dart
│ │ ├── swiper.dart
│ │ └── web.dart
│ ├── utils
│ │ ├── app_badge.dart
│ │ ├── battery.dart
│ │ ├── bugly.dart
│ │ ├── camera_complex.dart
│ │ ├── camera_simple.dart
│ │ ├── device_info.dart
│ │ ├── event_bus.dart
│ │ ├── jpush.dart
│ │ ├── json_serialize.dart
│ │ ├── local_notification.dart
│ │ ├── navigator.dart
│ │ ├── net.dart
│ │ ├── package_info.dart
│ │ ├── path.dart
│ │ ├── permission_apply.dart
│ │ ├── provider.dart
│ │ ├── provider_next.dart
│ │ ├── share.dart
│ │ ├── shared_preferences.dart
│ │ ├── sqlite.dart
│ │ ├── toast.dart
│ │ ├── url.dart
│ │ └── video.dart
│ └── widget
│ │ ├── anim
│ │ ├── basic_animation.dart
│ │ ├── stagger_animation.dart
│ │ └── transition_animations.dart
│ │ ├── appbar.dart
│ │ ├── bottom_navigation_bar.dart
│ │ ├── button.dart
│ │ ├── cardview.dart
│ │ ├── contain
│ │ ├── clip.dart
│ │ ├── constrained_box.dart
│ │ ├── container.dart
│ │ ├── decorated_box.dart
│ │ └── transform.dart
│ │ ├── control.dart
│ │ ├── custom
│ │ ├── combination_widget.dart
│ │ └── drawing_widget.dart
│ │ ├── dialog.dart
│ │ ├── drag.dart
│ │ ├── drawer.dart
│ │ ├── empty.dart
│ │ ├── form.dart
│ │ ├── future_builder.dart
│ │ ├── gesture.dart
│ │ ├── image
│ │ ├── cached_network_image.dart
│ │ ├── image.dart
│ │ └── image_zoom.dart
│ │ ├── input.dart
│ │ ├── layout
│ │ ├── layout_align.dart
│ │ ├── layout_flex.dart
│ │ ├── layout_linear.dart
│ │ ├── layout_stack.dart
│ │ └── layout_wrap.dart
│ │ ├── notification.dart
│ │ ├── progress.dart
│ │ ├── scrollview
│ │ ├── custom_scrollview.dart
│ │ ├── nested_scrollview.dart
│ │ └── scroll_controller.dart
│ │ ├── tab.dart
│ │ └── text.dart
├── router
│ ├── route.dart
│ ├── router.dart
│ └── switch_animation.dart
├── utils
│ ├── bugly.dart
│ ├── camera.dart
│ ├── click.dart
│ ├── device.dart
│ ├── dialog.dart
│ ├── download.dart
│ ├── event.dart
│ ├── http.dart
│ ├── notification.dart
│ ├── oktoast.dart
│ ├── path.dart
│ ├── provider.dart
│ ├── push.dart
│ ├── random.dart
│ ├── shared_preferences.dart
│ ├── sql.dart
│ ├── sql_helper.dart
│ ├── toast.dart
│ ├── umeng.dart
│ ├── utils.dart
│ ├── xuifont.dart
│ └── xupdate.dart
└── view
│ ├── button.dart
│ ├── gridview_page.dart
│ ├── home
│ ├── about.dart
│ ├── home_drawer.dart
│ ├── language.dart
│ ├── login.dart
│ ├── register.dart
│ ├── sponsor.dart
│ └── theme_color.dart
│ ├── list
│ ├── list_item.dart
│ └── sample_list_item.dart
│ ├── listview_page.dart
│ ├── loading_dialog.dart
│ ├── number_progress.dart
│ ├── simple_list_page.dart
│ ├── swiper_control.dart
│ ├── titlebar.dart
│ ├── update_dialog.dart
│ └── web_view_page.dart
├── pubspec.yaml
└── test
└── widget_test.dart
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/.DS_Store
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /target/
2 | !.mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // 使用 IntelliSense 了解相关属性。
3 | // 悬停以查看现有属性的描述。
4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": "Dart",
9 | "program": "flutter_learn/lib/main.dart",
10 | "request": "launch",
11 | "type": "dart"
12 | }
13 | ]
14 | }
--------------------------------------------------------------------------------
/flutter_learn/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .packages
28 | .pub-cache/
29 | .pub/
30 | /build/
31 | pubspec.lock
32 | .flutter-plugins-dependencies
33 |
34 | # Android related
35 | **/android/**/gradle-wrapper.jar
36 | **/android/.gradle
37 | **/android/captures/
38 | **/android/gradlew
39 | **/android/gradlew.bat
40 | **/android/local.properties
41 | **/android/**/GeneratedPluginRegistrant.java
42 | **/android/keystores/
43 |
44 | # iOS/XCode related
45 | **/ios/**/*.mode1v3
46 | **/ios/**/*.mode2v3
47 | **/ios/**/*.moved-aside
48 | **/ios/**/*.pbxuser
49 | **/ios/**/*.perspectivev3
50 | **/ios/**/*sync/
51 | **/ios/**/.sconsign.dblite
52 | **/ios/**/.tags*
53 | **/ios/**/.vagrant/
54 | **/ios/**/DerivedData/
55 | **/ios/**/Icon?
56 | **/ios/**/Pods/
57 | **/ios/**/.symlinks/
58 | **/ios/**/profile
59 | **/ios/**/xcuserdata
60 | **/ios/.generated/
61 | **/ios/Flutter/App.framework
62 | **/ios/Flutter/Flutter.framework
63 | **/ios/Flutter/Generated.xcconfig
64 | **/ios/Flutter/app.flx
65 | **/ios/Flutter/app.zip
66 | **/ios/Flutter/flutter_assets/
67 | **/ios/Flutter/flutter_export_environment.sh
68 | **/ios/ServiceDefinitions.json
69 | **/ios/Runner/GeneratedPluginRegistrant.*
70 |
71 | # Exceptions to above rules.
72 | !**/ios/**/default.mode1v3
73 | !**/ios/**/default.mode2v3
74 | !**/ios/**/default.pbxuser
75 | !**/ios/**/default.perspectivev3
76 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
77 |
--------------------------------------------------------------------------------
/flutter_learn/.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: 68587a0916366e9512a78df22c44163d041dd5f3
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/flutter_learn/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "java.configuration.updateBuildConfiguration": "automatic"
3 | }
--------------------------------------------------------------------------------
/flutter_learn/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/flutter_learn/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 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.xuexiang.flutterLearn"
42 | minSdkVersion 21
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 |
48 | manifestPlaceholders = [
49 | JPUSH_PKGNAME : "com.xuexiang.flutterLearn",
50 | JPUSH_APPKEY : "0a6e78d9e1f9fe225cedf1e8", // NOTE: JPush 上注册的包名对应的 Appkey.
51 | JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
52 | ]
53 | }
54 |
55 | signingConfigs {
56 | release {
57 | storeFile file("../keystores/android.keystore")
58 | storePassword "xuexiang"
59 | keyAlias "android.keystore"
60 | keyPassword "xuexiang"
61 | }
62 | }
63 |
64 | buildTypes {
65 | release {
66 | // TODO: Add your own signing config for the release build.
67 | // Signing with the debug keys for now, so `flutter run --release` works.
68 | signingConfig signingConfigs.release
69 | }
70 | }
71 |
72 | lintOptions {
73 | checkReleaseBuilds false
74 | abortOnError false
75 | }
76 | }
77 |
78 | flutter {
79 | source '../..'
80 | }
81 |
82 | dependencies {
83 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
84 | testImplementation 'junit:junit:4.12'
85 | androidTestImplementation 'androidx.test:runner:1.1.1'
86 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
87 | }
88 |
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/kotlin/com/xuexiang/flutterLearn/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.xuexiang.flutterLearn
2 |
3 | import androidx.annotation.NonNull;
4 | import io.flutter.embedding.android.FlutterActivity
5 | import io.flutter.embedding.engine.FlutterEngine
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
10 | GeneratedPluginRegistrant.registerWith(flutterEngine);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/drawable/ic_splash_app_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/android/app/src/main/res/drawable/ic_splash_app_logo.png
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 | -
9 |
12 |
13 |
14 | -
15 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/mipmap-hdpi/ic_splash_app_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/android/app/src/main/res/mipmap-hdpi/ic_splash_app_logo.png
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/mipmap-hdpi/ic_splash_company_logo_xuexiang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/android/app/src/main/res/mipmap-hdpi/ic_splash_company_logo_xuexiang.png
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/flutter_learn/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutter_learn/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | apply from: './repos.gradle'
3 | ext.kotlin_version = '1.3.72'
4 | addRepos(repositories)
5 | dependencies {
6 | classpath 'com.android.tools.build:gradle:3.5.0'
7 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
8 | }
9 | }
10 |
11 | allprojects {
12 | addRepos(repositories)
13 | }
14 |
15 | rootProject.buildDir = '../build'
16 | subprojects {
17 | project.buildDir = "${rootProject.buildDir}/${project.name}"
18 | }
19 | subprojects {
20 | project.evaluationDependsOn(':app')
21 | }
22 |
23 | task clean(type: Delete) {
24 | delete rootProject.buildDir
25 | }
26 |
--------------------------------------------------------------------------------
/flutter_learn/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
--------------------------------------------------------------------------------
/flutter_learn/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 |
--------------------------------------------------------------------------------
/flutter_learn/android/repos.gradle:
--------------------------------------------------------------------------------
1 | //默认添加代码仓库路径
2 | static def addRepos(RepositoryHandler handler) {
3 | handler.mavenLocal()
4 | handler.google { url 'https://maven.aliyun.com/repository/google' }
5 | handler.jcenter { url 'https://maven.aliyun.com/repository/jcenter' }
6 | handler.mavenCentral { url 'https://maven.aliyun.com/repository/central' }
7 | handler.maven { url "https://jitpack.io" }
8 | handler.maven { url 'https://maven.aliyun.com/repository/public' }
9 | handler.maven { url 'https://oss.sonatype.org/content/repositories/public' }
10 | }
11 |
12 | ext.addRepos = this.&addRepos
13 |
14 |
15 |
--------------------------------------------------------------------------------
/flutter_learn/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 |
--------------------------------------------------------------------------------
/flutter_learn/apk/app-release.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/apk/app-release.apk
--------------------------------------------------------------------------------
/flutter_learn/art/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/1.png
--------------------------------------------------------------------------------
/flutter_learn/art/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/2.png
--------------------------------------------------------------------------------
/flutter_learn/art/3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/3.png
--------------------------------------------------------------------------------
/flutter_learn/art/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/4.png
--------------------------------------------------------------------------------
/flutter_learn/art/5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/5.png
--------------------------------------------------------------------------------
/flutter_learn/art/6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/6.png
--------------------------------------------------------------------------------
/flutter_learn/art/7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/7.png
--------------------------------------------------------------------------------
/flutter_learn/art/8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/8.png
--------------------------------------------------------------------------------
/flutter_learn/art/9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/9.png
--------------------------------------------------------------------------------
/flutter_learn/art/alipay.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/alipay.jpeg
--------------------------------------------------------------------------------
/flutter_learn/art/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/demo.gif
--------------------------------------------------------------------------------
/flutter_learn/art/download_github.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/download_github.png
--------------------------------------------------------------------------------
/flutter_learn/art/download_pugongying.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/download_pugongying.png
--------------------------------------------------------------------------------
/flutter_learn/art/wxpay.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/art/wxpay.jpeg
--------------------------------------------------------------------------------
/flutter_learn/assets/app.db:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/app.db
--------------------------------------------------------------------------------
/flutter_learn/assets/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/flutter_learn/assets/images/bg_update_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/bg_update_top.png
--------------------------------------------------------------------------------
/flutter_learn/assets/images/flutter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/flutter.png
--------------------------------------------------------------------------------
/flutter_learn/assets/images/food01.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/food01.jpeg
--------------------------------------------------------------------------------
/flutter_learn/assets/images/food02.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/food02.jpeg
--------------------------------------------------------------------------------
/flutter_learn/assets/images/food03.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/food03.jpeg
--------------------------------------------------------------------------------
/flutter_learn/assets/images/food04.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/food04.jpeg
--------------------------------------------------------------------------------
/flutter_learn/assets/images/food05.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/food05.jpeg
--------------------------------------------------------------------------------
/flutter_learn/assets/images/food06.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/food06.jpeg
--------------------------------------------------------------------------------
/flutter_learn/assets/images/normal_user_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/normal_user_icon.png
--------------------------------------------------------------------------------
/flutter_learn/assets/images/scenery.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/scenery.jpg
--------------------------------------------------------------------------------
/flutter_learn/assets/images/timg.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/timg.jpeg
--------------------------------------------------------------------------------
/flutter_learn/assets/images/xupdate_bg_app_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/xupdate_bg_app_top.png
--------------------------------------------------------------------------------
/flutter_learn/assets/images/xupdate_ic_close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/assets/images/xupdate_ic_close.png
--------------------------------------------------------------------------------
/flutter_learn/assets/json/app_version.json:
--------------------------------------------------------------------------------
1 | {
2 | "code": 0,
3 | "msg": "",
4 | "updateStatus": 1,
5 | "versionCode": 3,
6 | "versionName": "1.0.2",
7 | "uploadTime": "2018-07-10 17:28:41",
8 | "modifyContent": "\r\n1、优化api接口。\r\n2、添加使用demo演示。\r\n3、新增自定义更新服务api接口。\r\n4、优化更新提示界面。",
9 | "downloadUrl": "https://raw.githubusercontent.com/xuexiangjys/xupdate/master/apk/xupdate_demo_1.0.2.apk",
10 | "apkSize": 2048,
11 | "apkMd5": "e4b79a36efb9f17df7e3bb161f9bcfd8"
12 | }
--------------------------------------------------------------------------------
/flutter_learn/assets/json/picker2.json:
--------------------------------------------------------------------------------
1 | [
2 | [
3 | "一年级",
4 | "二年级",
5 | "三年级",
6 | "四年级",
7 | "五年级",
8 | "六年级",
9 | "初一",
10 | "初二",
11 | "初三",
12 | "高一",
13 | "高二",
14 | "高三"
15 | ],
16 | [
17 | "1班",
18 | "2班",
19 | "3班",
20 | "4班",
21 | "5班",
22 | "6班",
23 | "7班",
24 | "8班",
25 | "9班",
26 | "10班",
27 | "11班",
28 | "12班",
29 | "13班",
30 | "14班",
31 | "15班",
32 | "16班",
33 | "17班",
34 | "18班",
35 | "19班",
36 | "20班"
37 | ]
38 | ]
--------------------------------------------------------------------------------
/flutter_learn/intl.sh:
--------------------------------------------------------------------------------
1 | flutter pub pub run intl_translation:extract_to_arb --output-dir=i10n-arb lib/i10n/localization_intl.dart
2 | flutter pub pub run intl_translation:generate_from_arb --output-dir=lib/i10n --no-use-deferred-loading lib/i10n/localization_intl.dart i10n-arb/intl_*.arb
--------------------------------------------------------------------------------
/flutter_learn/ios/Flutter/.last_build_id:
--------------------------------------------------------------------------------
1 | c9b26dc9f2cebfc4bd8303cc71bdc6c9
--------------------------------------------------------------------------------
/flutter_learn/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
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 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Flutter/Flutter.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # NOTE: This podspec is NOT to be published. It is only used as a local source!
3 | #
4 |
5 | Pod::Spec.new do |s|
6 | s.name = 'Flutter'
7 | s.version = '1.0.0'
8 | s.summary = 'High-performance, high-fidelity mobile apps.'
9 | s.description = <<-DESC
10 | Flutter provides an easy and productive way to build and deploy high-performance mobile apps for Android and iOS.
11 | DESC
12 | s.homepage = 'https://flutter.io'
13 | s.license = { :type => 'MIT' }
14 | s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
15 | s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
16 | s.ios.deployment_target = '8.0'
17 | s.vendored_frameworks = 'Flutter.framework'
18 | end
19 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/flutter_learn/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 flutter_root
14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15 | unless File.exist?(generated_xcode_build_settings_path)
16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17 | end
18 |
19 | File.foreach(generated_xcode_build_settings_path) do |line|
20 | matches = line.match(/FLUTTER_ROOT\=(.*)/)
21 | return matches[1].strip if matches
22 | end
23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24 | end
25 |
26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27 |
28 | flutter_ios_podfile_setup
29 |
30 | target 'Runner' do
31 | use_frameworks!
32 | use_modular_headers!
33 |
34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
35 | end
36 |
37 | post_install do |installer|
38 | installer.pods_project.targets.each do |target|
39 | flutter_additional_ios_build_settings(target)
40 | end
41 | end
42 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 | import flutter_downloader
4 |
5 | @UIApplicationMain
6 | @objc class AppDelegate: FlutterAppDelegate {
7 | override func application(
8 | _ application: UIApplication,
9 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
10 | ) -> Bool {
11 | GeneratedPluginRegistrant.register(with: self)
12 | FlutterDownloaderPlugin.setPluginRegistrantCallback(registerPlugins)
13 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
14 | }
15 | }
16 |
17 | private func registerPlugins(registry: FlutterPluginRegistry) {
18 | if (!registry.hasPlugin("FlutterDownloaderPlugin")) {
19 | FlutterDownloaderPlugin.register(with: registry.registrar(forPlugin: "FlutterDownloaderPlugin")!)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/flutter_learn/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 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/flutter_learn/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 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xuexiangjys/FlutterSample/92b375f49437b4428e9fe145616b945bc7e8abd0/flutter_learn/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/flutter_learn/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.
--------------------------------------------------------------------------------
/flutter_learn/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 |
--------------------------------------------------------------------------------
/flutter_learn/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 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleDisplayName
8 | flutter学习
9 | CFBundleExecutable
10 | $(EXECUTABLE_NAME)
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | $(FLUTTER_BUILD_NUMBER)
25 | LSRequiresIPhoneOS
26 |
27 | UILaunchStoryboardName
28 | LaunchScreen
29 | UIMainStoryboardFile
30 | Main
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 | UISupportedInterfaceOrientations~ipad
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationPortraitUpsideDown
41 | UIInterfaceOrientationLandscapeLeft
42 | UIInterfaceOrientationLandscapeRight
43 |
44 | UIViewControllerBasedStatusBarAppearance
45 |
46 | UIBackgroundModes
47 |
48 | fetch
49 | remote-notification
50 |
51 | NSPhotoLibraryUsageDescription
52 | 应用需要访问您的照片
53 | NSCameraUsageDescription
54 | 应用需要访问您的相机
55 | NSMicrophoneUsageDescription
56 | 应用需要访问您的麦克风
57 | NSAppTransportSecurity
58 |
59 | NSAllowsArbitraryLoads
60 |
61 |
62 | FDMaximumConcurrentTasks
63 | 5
64 | FDAllFilesDownloadedMessage
65 | All files have been downloaded
66 |
67 |
68 |
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/flutter_learn/ios/Runner/Runner.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | aps-environment
6 | development
7 |
8 |
9 |
--------------------------------------------------------------------------------
/flutter_learn/jsonapi/update_api.json:
--------------------------------------------------------------------------------
1 | {
2 | "Code": 0,
3 | "Msg": "",
4 | "UpdateStatus": 1,
5 | "VersionCode": 3,
6 | "VersionName": "1.0.2",
7 | "UploadTime": "2020-02-20 08:00:00",
8 | "ModifyContent": "\r\n1、增加了账号系统。\r\n2、增加了语言和皮肤主题的切换功能。\r\n3、还有更多新增的案例待你去发现。",
9 | "DownloadUrl": "https://raw.githubusercontent.com/xuexiangjys/FlutterSample/master/flutter_learn/apk/app-release.apk",
10 | "ApkSize": 23338,
11 | "ApkMd5": "29385F984CC427632514ADA4435928EC"
12 | }
--------------------------------------------------------------------------------
/flutter_learn/lib/home.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_learn/i10n/localization_intl.dart';
3 | import 'package:flutter_learn/router/route.dart';
4 | import 'package:flutter_learn/utils/click.dart';
5 | import 'package:flutter_learn/utils/xupdate.dart';
6 | import 'package:flutter_learn/view/gridview_page.dart';
7 | import 'package:flutter_learn/view/home/home_drawer.dart';
8 |
9 | class MainHomePage extends StatefulWidget {
10 | MainHomePage({Key key}) : super(key: key);
11 | @override
12 | _MainHomePageState createState() => _MainHomePageState();
13 | }
14 |
15 | class _MainHomePageState extends State
16 | with SingleTickerProviderStateMixin {
17 | List getTabs(BuildContext context) => [
18 | Tab(text: Languages.of(context).widget),
19 | Tab(text: Languages.of(context).utils),
20 | Tab(text: Languages.of(context).expand)
21 | ];
22 |
23 | List getTabViews(BuildContext context) => [
24 | GridViewPage(items: RouteMap.getWidgetItems(context)),
25 | GridViewPage(items: RouteMap.getUtilsItems(context)),
26 | GridViewPage(items: RouteMap.getExpandItems(context)),
27 | ];
28 |
29 | TabController _tabController;
30 |
31 | @override
32 | void initState() {
33 | super.initState();
34 | _tabController = TabController(vsync: this, length: 3);
35 |
36 | XUpdate.initAndCheck();
37 | }
38 |
39 | @override
40 | void dispose() {
41 | _tabController.dispose();
42 | super.dispose();
43 | }
44 |
45 | final GlobalKey _scaffoldKey = GlobalKey();
46 |
47 | @override
48 | Widget build(BuildContext context) {
49 | return WillPopScope(
50 | child: Scaffold(
51 | key: _scaffoldKey,
52 | appBar: AppBar(
53 | title: Text(Languages.of(context).title),
54 | bottom: TabBar(
55 | controller: _tabController,
56 | tabs: getTabs(context),
57 | ),
58 | ),
59 | drawer: HomeDrawer(),
60 | body: TabBarView(
61 | controller: _tabController,
62 | children: getTabViews(context).map((Widget widget) {
63 | return widget;
64 | }).toList(),
65 | ),
66 | ),
67 | //监听导航栏返回,类似onKeyEvent
68 | onWillPop: () =>
69 | ClickUtils.exitBy2Click(status: _scaffoldKey.currentState));
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/flutter_learn/lib/i10n/messages_all.dart:
--------------------------------------------------------------------------------
1 | // DO NOT EDIT. This is code generated via package:intl/generate_localized.dart
2 | // This is a library that looks up messages for specific locales by
3 | // delegating to the appropriate library.
4 |
5 | // Ignore issues from commonly used lints in this file.
6 | // ignore_for_file:implementation_imports, file_names, unnecessary_new
7 | // ignore_for_file:unnecessary_brace_in_string_interps, directives_ordering
8 | // ignore_for_file:argument_type_not_assignable, invalid_assignment
9 | // ignore_for_file:prefer_single_quotes, prefer_generic_function_type_aliases
10 | // ignore_for_file:comment_references
11 |
12 | import 'dart:async';
13 |
14 | import 'package:intl/intl.dart';
15 | import 'package:intl/message_lookup_by_library.dart';
16 | import 'package:intl/src/intl_helpers.dart';
17 |
18 | import 'messages_messages.dart' as messages_messages;
19 | import 'messages_zh_CN.dart' as messages_zh_cn;
20 |
21 | typedef Future LibraryLoader();
22 | Map _deferredLibraries = {
23 | 'messages': () => new Future.value(null),
24 | 'zh_CN': () => new Future.value(null),
25 | };
26 |
27 | MessageLookupByLibrary _findExact(String localeName) {
28 | switch (localeName) {
29 | case 'messages':
30 | return messages_messages.messages;
31 | case 'zh_CN':
32 | return messages_zh_cn.messages;
33 | default:
34 | return null;
35 | }
36 | }
37 |
38 | /// User programs should call this before using [localeName] for messages.
39 | Future initializeMessages(String localeName) async {
40 | var availableLocale = Intl.verifiedLocale(
41 | localeName,
42 | (locale) => _deferredLibraries[locale] != null,
43 | onFailure: (_) => null);
44 | if (availableLocale == null) {
45 | return new Future.value(false);
46 | }
47 | var lib = _deferredLibraries[availableLocale];
48 | await (lib == null ? new Future.value(false) : lib());
49 | initializeInternalMessageLookup(() => new CompositeMessageLookup());
50 | messageLookup.addLocale(availableLocale, _findGeneratedMessagesFor);
51 | return new Future.value(true);
52 | }
53 |
54 | bool _messagesExistFor(String locale) {
55 | try {
56 | return _findExact(locale) != null;
57 | } catch (e) {
58 | return false;
59 | }
60 | }
61 |
62 | MessageLookupByLibrary _findGeneratedMessagesFor(String locale) {
63 | var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
64 | onFailure: (_) => null);
65 | if (actualLocale == null) return null;
66 | return _findExact(actualLocale);
67 | }
68 |
--------------------------------------------------------------------------------
/flutter_learn/lib/init/app_init.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:flutter_learn/init/normal_app.dart';
5 |
6 | //应用初始化
7 | class AppInit {
8 |
9 | static void run() {
10 | catchException(() => NormalApp.run());
11 | // //Bugly的异常捕获上传
12 | // Bugly.postCatchedException(() => NormalApp.run());
13 | }
14 |
15 | ///异常捕获处理
16 | static void catchException(T callback()) {
17 | //捕获异常的回调
18 | FlutterError.onError = (FlutterErrorDetails details) {
19 | reportErrorAndLog(details);
20 | };
21 | runZoned>(
22 | () async {
23 | callback();
24 | },
25 | zoneSpecification: ZoneSpecification(
26 | print: (Zone self, ZoneDelegate parent, Zone zone, String line) {
27 | collectLog(parent, zone, line); // 收集日志
28 | },
29 | ),
30 | //未捕获的异常的回调
31 | onError: (Object obj, StackTrace stack) {
32 | var details = makeDetails(obj, stack);
33 | reportErrorAndLog(details);
34 | },
35 | );
36 | }
37 |
38 | //日志拦截, 收集日志
39 | static void collectLog(ZoneDelegate parent, Zone zone, String line) {
40 | parent.print(zone, "日志拦截: $line");
41 | }
42 |
43 | //上报错误和日志逻辑
44 | static void reportErrorAndLog(FlutterErrorDetails details) {
45 | print(details);
46 | }
47 |
48 | // 构建错误信息
49 | static FlutterErrorDetails makeDetails(Object obj, StackTrace stack) {
50 | return FlutterErrorDetails(stack: stack);
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/flutter_learn/lib/init/splash.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_learn/utils/shared_preferences.dart';
3 |
4 | //类似广告启动页
5 | class SplashPage extends StatefulWidget {
6 | @override
7 | _SplashPageState createState() => _SplashPageState();
8 | }
9 |
10 | class _SplashPageState extends State {
11 | @override
12 | void initState() {
13 | super.initState();
14 | countDown();
15 | }
16 |
17 | @override
18 | Widget build(BuildContext context) {
19 | return Container(
20 | decoration: BoxDecoration(
21 | color: Colors.white,
22 | ),
23 | child: Center(
24 | child: Image(
25 | image: AssetImage('assets/images/flutter.png'),
26 | height: 96,
27 | width: 96,
28 | )));
29 | }
30 |
31 | //倒计时
32 | void countDown() {
33 | var _duration = Duration(seconds: 2);
34 | new Future.delayed(_duration, goHomePage);
35 | }
36 |
37 | //页面跳转
38 | void goHomePage() {
39 | String nickName = SPUtils.getNickName();
40 | if (nickName != null && nickName.isNotEmpty) {
41 | Navigator.of(context).pushReplacementNamed('/home');
42 | } else {
43 | Navigator.of(context).pushReplacementNamed('/login');
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/flutter_learn/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_learn/init/app_init.dart';
2 |
3 | //程序的主入口
4 | void main() => AppInit.run();
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/flutter_learn/lib/model/sql/app_info.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | //使用Dart Data Class Generator插件进行创建
4 | //使用命令: Generate from JSON
5 | class AppInfo {
6 | final int code;
7 | final String msg;
8 | final int updateStatus;
9 | final int versionCode;
10 | final String versionName;
11 | final String uploadTime;
12 | final String modifyContent;
13 | final String downloadUrl;
14 | final int apkSize;
15 | final String apkMd5;
16 | AppInfo({
17 | this.code,
18 | this.msg,
19 | this.updateStatus,
20 | this.versionCode,
21 | this.versionName,
22 | this.uploadTime,
23 | this.modifyContent,
24 | this.downloadUrl,
25 | this.apkSize,
26 | this.apkMd5,
27 | });
28 |
29 | Map toMap() {
30 | return {
31 | 'code': code,
32 | 'msg': msg,
33 | 'updateStatus': updateStatus,
34 | 'versionCode': versionCode,
35 | 'versionName': versionName,
36 | 'uploadTime': uploadTime,
37 | 'modifyContent': modifyContent,
38 | 'downloadUrl': downloadUrl,
39 | 'apkSize': apkSize,
40 | 'apkMd5': apkMd5,
41 | };
42 | }
43 |
44 | static AppInfo fromMap(Map map) {
45 | if (map == null) return null;
46 |
47 | return AppInfo(
48 | code: map['code']?.toInt(),
49 | msg: map['msg'],
50 | updateStatus: map['updateStatus']?.toInt(),
51 | versionCode: map['versionCode']?.toInt(),
52 | versionName: map['versionName'],
53 | uploadTime: map['uploadTime'],
54 | modifyContent: map['modifyContent'],
55 | downloadUrl: map['downloadUrl'],
56 | apkSize: map['apkSize']?.toInt(),
57 | apkMd5: map['apkMd5'],
58 | );
59 | }
60 |
61 | String toJson() => json.encode(toMap());
62 |
63 | static AppInfo fromJson(String source) => fromMap(json.decode(source));
64 |
65 | @override
66 | String toString() {
67 | return 'AppInfo code: $code, msg: $msg, updateStatus: $updateStatus, versionCode: $versionCode, versionName: $versionName, uploadTime: $uploadTime, modifyContent: $modifyContent, downloadUrl: $downloadUrl, apkSize: $apkSize, apkMd5: $apkMd5';
68 | }
69 | }
--------------------------------------------------------------------------------
/flutter_learn/lib/model/sql/user_info.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_learn/utils/sql.dart';
2 |
3 | abstract class UserInfoInterface {
4 | int get id;
5 | String get userName;
6 | String get password;
7 | String get nickName;
8 | int get age;
9 | int get sex;
10 | }
11 |
12 | class UserInfo implements UserInfoInterface {
13 | int id;
14 | String userName;
15 | String password;
16 | String nickName;
17 | int age;
18 | int sex;
19 |
20 | UserInfo(
21 | {this.id,
22 | this.userName,
23 | this.password,
24 | this.nickName,
25 | this.age,
26 | this.sex});
27 |
28 | factory UserInfo.fromJSON(Map json) {
29 | return UserInfo(
30 | id: json['id'],
31 | userName: json['userName'],
32 | password: json['password'],
33 | nickName: json['nickName'],
34 | age: json['age'],
35 | sex: json['sex']);
36 | }
37 |
38 | Map toJSON() {
39 | return {
40 | 'id': id,
41 | 'userName': userName,
42 | 'password': password,
43 | 'nickName': nickName,
44 | 'age': age,
45 | 'sex': sex
46 | };
47 | }
48 | }
49 |
50 | class UserInfoModel {
51 | final String table = 'userInfo';
52 | Sql sql;
53 |
54 | UserInfoModel() {
55 | sql = Sql.setTable(table);
56 | }
57 |
58 | // 插入
59 | Future