└── yinll_flutter ├── .gitignore ├── .metadata ├── README.md ├── android ├── app │ ├── build.gradle │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── yinl │ │ │ └── yinl │ │ │ └── yinllflutter │ │ │ └── MainActivity.java │ │ └── res │ │ ├── drawable │ │ └── launch_background.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ └── styles.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.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 ├── lib ├── CustomView │ ├── DemoPage.dart │ ├── MyCustomCircle.dart │ └── PieData.dart ├── keyboard │ ├── CustomJPasswordFieldWidget.dart │ ├── custom_keyboard_button.dart │ ├── keyboard_main.dart │ ├── keyboard_widget.dart │ └── pay_password.dart ├── main.dart ├── net │ ├── ApiInterface.dart │ ├── NetUtil.dart │ └── common_error_handler_utils.dart ├── redux │ ├── AppState.dart │ ├── DemoUseStorePage.dart │ ├── demo.dart │ ├── redux_main.dart │ ├── user.dart │ └── user_reducer.dart └── route_demo │ ├── Screen1.dart │ ├── Screen2.dart │ ├── Screen3.dart │ ├── Screen4.dart │ └── Screen5.dart ├── pubspec.yaml └── test └── widget_test.dart /yinll_flutter/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 72 | -------------------------------------------------------------------------------- /yinll_flutter/.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: 9dfc0f3aaa4c31557826fc32bb8b04e3f18ac4d3 8 | channel: master 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /yinll_flutter/README.md: -------------------------------------------------------------------------------- 1 | # yinll_flutter 2 | 3 | A new Flutter application. 4 | 5 | ## Getting Started 6 | 7 | For help getting started with Flutter, view our online 8 | [documentation](https://flutter.io/). 9 | 10 | 这里是对应的博客链接,欢迎大家阅读! 如果觉得有帮助,帮忙点个赞和关注,哈哈! 11 | 12 | [Flutter仿微信,支付宝密码输入框+自定义键盘](https://juejin.im/post/5c10ef31e51d452e2c698673) 13 | 14 | [Flutter 自定义View之 饼状图](https://juejin.im/post/5bee5d9de51d4532de530734) 15 | 16 | [Flutter路由管理](https://juejin.im/post/5be2d6546fb9a049be5cf6d5) 17 | 18 | [Flutter TextField属性详解](https://juejin.im/post/5bee5e17e51d4523ec262737) 19 | 20 | [Flutter 网络请求框架封装](https://juejin.im/post/5c161e24e51d4546f83c8ae8) 21 | -------------------------------------------------------------------------------- /yinll_flutter/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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 27 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "yinl.yinl.yinllflutter" 37 | minSdkVersion 16 38 | targetSdkVersion 27 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /yinll_flutter/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /yinll_flutter/android/app/src/main/java/yinl/yinl/yinllflutter/MainActivity.java: -------------------------------------------------------------------------------- 1 | package yinl.yinl.yinllflutter; 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 | -------------------------------------------------------------------------------- /yinll_flutter/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /yinll_flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /yinll_flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /yinll_flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /yinll_flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /yinll_flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /yinll_flutter/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /yinll_flutter/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /yinll_flutter/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /yinll_flutter/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /yinll_flutter/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 | -------------------------------------------------------------------------------- /yinll_flutter/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 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 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 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 19 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 20 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 21 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXCopyFilesBuildPhase section */ 25 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 26 | isa = PBXCopyFilesBuildPhase; 27 | buildActionMask = 2147483647; 28 | dstPath = ""; 29 | dstSubfolderSpec = 10; 30 | files = ( 31 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 32 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 33 | ); 34 | name = "Embed Frameworks"; 35 | runOnlyForDeploymentPostprocessing = 0; 36 | }; 37 | /* End PBXCopyFilesBuildPhase section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 41 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 42 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 43 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 44 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 45 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 46 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 48 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 49 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 50 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 51 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 53 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 54 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 55 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | /* End PBXFileReference section */ 57 | 58 | /* Begin PBXFrameworksBuildPhase section */ 59 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 64 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | /* End PBXFrameworksBuildPhase section */ 69 | 70 | /* Begin PBXGroup section */ 71 | 9740EEB11CF90186004384FC /* Flutter */ = { 72 | isa = PBXGroup; 73 | children = ( 74 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 75 | 3B80C3931E831B6300D905FE /* App.framework */, 76 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 77 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 78 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 79 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 80 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 81 | ); 82 | name = Flutter; 83 | sourceTree = ""; 84 | }; 85 | 97C146E51CF9000F007C117D = { 86 | isa = PBXGroup; 87 | children = ( 88 | 9740EEB11CF90186004384FC /* Flutter */, 89 | 97C146F01CF9000F007C117D /* Runner */, 90 | 97C146EF1CF9000F007C117D /* Products */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 97C146EF1CF9000F007C117D /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 97C146EE1CF9000F007C117D /* Runner.app */, 98 | ); 99 | name = Products; 100 | sourceTree = ""; 101 | }; 102 | 97C146F01CF9000F007C117D /* Runner */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 106 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 107 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 108 | 97C147021CF9000F007C117D /* Info.plist */, 109 | 97C146F11CF9000F007C117D /* Supporting Files */, 110 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 111 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 112 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 113 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 114 | ); 115 | path = Runner; 116 | sourceTree = ""; 117 | }; 118 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | ); 122 | name = "Supporting Files"; 123 | sourceTree = ""; 124 | }; 125 | /* End PBXGroup section */ 126 | 127 | /* Begin PBXNativeTarget section */ 128 | 97C146ED1CF9000F007C117D /* Runner */ = { 129 | isa = PBXNativeTarget; 130 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 131 | buildPhases = ( 132 | 9740EEB61CF901F6004384FC /* Run Script */, 133 | 97C146EA1CF9000F007C117D /* Sources */, 134 | 97C146EB1CF9000F007C117D /* Frameworks */, 135 | 97C146EC1CF9000F007C117D /* Resources */, 136 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 137 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 138 | ); 139 | buildRules = ( 140 | ); 141 | dependencies = ( 142 | ); 143 | name = Runner; 144 | productName = Runner; 145 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 146 | productType = "com.apple.product-type.application"; 147 | }; 148 | /* End PBXNativeTarget section */ 149 | 150 | /* Begin PBXProject section */ 151 | 97C146E61CF9000F007C117D /* Project object */ = { 152 | isa = PBXProject; 153 | attributes = { 154 | LastUpgradeCheck = 0910; 155 | ORGANIZATIONNAME = "The Chromium Authors"; 156 | TargetAttributes = { 157 | 97C146ED1CF9000F007C117D = { 158 | CreatedOnToolsVersion = 7.3.1; 159 | LastSwiftMigration = 0910; 160 | }; 161 | }; 162 | }; 163 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 164 | compatibilityVersion = "Xcode 3.2"; 165 | developmentRegion = English; 166 | hasScannedForEncodings = 0; 167 | knownRegions = ( 168 | en, 169 | Base, 170 | ); 171 | mainGroup = 97C146E51CF9000F007C117D; 172 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 173 | projectDirPath = ""; 174 | projectRoot = ""; 175 | targets = ( 176 | 97C146ED1CF9000F007C117D /* Runner */, 177 | ); 178 | }; 179 | /* End PBXProject section */ 180 | 181 | /* Begin PBXResourcesBuildPhase section */ 182 | 97C146EC1CF9000F007C117D /* Resources */ = { 183 | isa = PBXResourcesBuildPhase; 184 | buildActionMask = 2147483647; 185 | files = ( 186 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 187 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 188 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 189 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 190 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 191 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | /* End PBXResourcesBuildPhase section */ 196 | 197 | /* Begin PBXShellScriptBuildPhase section */ 198 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 199 | isa = PBXShellScriptBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | ); 203 | inputPaths = ( 204 | ); 205 | name = "Thin Binary"; 206 | outputPaths = ( 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | shellPath = /bin/sh; 210 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 211 | }; 212 | 9740EEB61CF901F6004384FC /* Run Script */ = { 213 | isa = PBXShellScriptBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | ); 217 | inputPaths = ( 218 | ); 219 | name = "Run Script"; 220 | outputPaths = ( 221 | ); 222 | runOnlyForDeploymentPostprocessing = 0; 223 | shellPath = /bin/sh; 224 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 225 | }; 226 | /* End PBXShellScriptBuildPhase section */ 227 | 228 | /* Begin PBXSourcesBuildPhase section */ 229 | 97C146EA1CF9000F007C117D /* Sources */ = { 230 | isa = PBXSourcesBuildPhase; 231 | buildActionMask = 2147483647; 232 | files = ( 233 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 234 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 235 | ); 236 | runOnlyForDeploymentPostprocessing = 0; 237 | }; 238 | /* End PBXSourcesBuildPhase section */ 239 | 240 | /* Begin PBXVariantGroup section */ 241 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 242 | isa = PBXVariantGroup; 243 | children = ( 244 | 97C146FB1CF9000F007C117D /* Base */, 245 | ); 246 | name = Main.storyboard; 247 | sourceTree = ""; 248 | }; 249 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 250 | isa = PBXVariantGroup; 251 | children = ( 252 | 97C147001CF9000F007C117D /* Base */, 253 | ); 254 | name = LaunchScreen.storyboard; 255 | sourceTree = ""; 256 | }; 257 | /* End PBXVariantGroup section */ 258 | 259 | /* Begin XCBuildConfiguration section */ 260 | 97C147031CF9000F007C117D /* Debug */ = { 261 | isa = XCBuildConfiguration; 262 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 263 | buildSettings = { 264 | ALWAYS_SEARCH_USER_PATHS = NO; 265 | CLANG_ANALYZER_NONNULL = YES; 266 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 267 | CLANG_CXX_LIBRARY = "libc++"; 268 | CLANG_ENABLE_MODULES = YES; 269 | CLANG_ENABLE_OBJC_ARC = YES; 270 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 271 | CLANG_WARN_BOOL_CONVERSION = YES; 272 | CLANG_WARN_COMMA = YES; 273 | CLANG_WARN_CONSTANT_CONVERSION = YES; 274 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 275 | CLANG_WARN_EMPTY_BODY = YES; 276 | CLANG_WARN_ENUM_CONVERSION = YES; 277 | CLANG_WARN_INFINITE_RECURSION = YES; 278 | CLANG_WARN_INT_CONVERSION = YES; 279 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 280 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 281 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 282 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 283 | CLANG_WARN_STRICT_PROTOTYPES = YES; 284 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 285 | CLANG_WARN_UNREACHABLE_CODE = YES; 286 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 287 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 288 | COPY_PHASE_STRIP = NO; 289 | DEBUG_INFORMATION_FORMAT = dwarf; 290 | ENABLE_STRICT_OBJC_MSGSEND = YES; 291 | ENABLE_TESTABILITY = YES; 292 | GCC_C_LANGUAGE_STANDARD = gnu99; 293 | GCC_DYNAMIC_NO_PIC = NO; 294 | GCC_NO_COMMON_BLOCKS = YES; 295 | GCC_OPTIMIZATION_LEVEL = 0; 296 | GCC_PREPROCESSOR_DEFINITIONS = ( 297 | "DEBUG=1", 298 | "$(inherited)", 299 | ); 300 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 301 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 302 | GCC_WARN_UNDECLARED_SELECTOR = YES; 303 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 304 | GCC_WARN_UNUSED_FUNCTION = YES; 305 | GCC_WARN_UNUSED_VARIABLE = YES; 306 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 307 | MTL_ENABLE_DEBUG_INFO = YES; 308 | ONLY_ACTIVE_ARCH = YES; 309 | SDKROOT = iphoneos; 310 | TARGETED_DEVICE_FAMILY = "1,2"; 311 | }; 312 | name = Debug; 313 | }; 314 | 97C147041CF9000F007C117D /* Release */ = { 315 | isa = XCBuildConfiguration; 316 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 317 | buildSettings = { 318 | ALWAYS_SEARCH_USER_PATHS = NO; 319 | CLANG_ANALYZER_NONNULL = YES; 320 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 321 | CLANG_CXX_LIBRARY = "libc++"; 322 | CLANG_ENABLE_MODULES = YES; 323 | CLANG_ENABLE_OBJC_ARC = YES; 324 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 325 | CLANG_WARN_BOOL_CONVERSION = YES; 326 | CLANG_WARN_COMMA = YES; 327 | CLANG_WARN_CONSTANT_CONVERSION = YES; 328 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 329 | CLANG_WARN_EMPTY_BODY = YES; 330 | CLANG_WARN_ENUM_CONVERSION = YES; 331 | CLANG_WARN_INFINITE_RECURSION = YES; 332 | CLANG_WARN_INT_CONVERSION = YES; 333 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 334 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 335 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 336 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 337 | CLANG_WARN_STRICT_PROTOTYPES = YES; 338 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 339 | CLANG_WARN_UNREACHABLE_CODE = YES; 340 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 341 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 342 | COPY_PHASE_STRIP = NO; 343 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 344 | ENABLE_NS_ASSERTIONS = NO; 345 | ENABLE_STRICT_OBJC_MSGSEND = YES; 346 | GCC_C_LANGUAGE_STANDARD = gnu99; 347 | GCC_NO_COMMON_BLOCKS = YES; 348 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 349 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 350 | GCC_WARN_UNDECLARED_SELECTOR = YES; 351 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 352 | GCC_WARN_UNUSED_FUNCTION = YES; 353 | GCC_WARN_UNUSED_VARIABLE = YES; 354 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 355 | MTL_ENABLE_DEBUG_INFO = NO; 356 | SDKROOT = iphoneos; 357 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 358 | TARGETED_DEVICE_FAMILY = "1,2"; 359 | VALIDATE_PRODUCT = YES; 360 | }; 361 | name = Release; 362 | }; 363 | 97C147061CF9000F007C117D /* Debug */ = { 364 | isa = XCBuildConfiguration; 365 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 366 | buildSettings = { 367 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 368 | CLANG_ENABLE_MODULES = YES; 369 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 370 | ENABLE_BITCODE = NO; 371 | FRAMEWORK_SEARCH_PATHS = ( 372 | "$(inherited)", 373 | "$(PROJECT_DIR)/Flutter", 374 | ); 375 | INFOPLIST_FILE = Runner/Info.plist; 376 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 377 | LIBRARY_SEARCH_PATHS = ( 378 | "$(inherited)", 379 | "$(PROJECT_DIR)/Flutter", 380 | ); 381 | PRODUCT_BUNDLE_IDENTIFIER = yinl.yinl.yinllFlutter; 382 | PRODUCT_NAME = "$(TARGET_NAME)"; 383 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 384 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 385 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 386 | SWIFT_VERSION = 4.0; 387 | VERSIONING_SYSTEM = "apple-generic"; 388 | }; 389 | name = Debug; 390 | }; 391 | 97C147071CF9000F007C117D /* Release */ = { 392 | isa = XCBuildConfiguration; 393 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 394 | buildSettings = { 395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 396 | CLANG_ENABLE_MODULES = YES; 397 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 398 | ENABLE_BITCODE = NO; 399 | FRAMEWORK_SEARCH_PATHS = ( 400 | "$(inherited)", 401 | "$(PROJECT_DIR)/Flutter", 402 | ); 403 | INFOPLIST_FILE = Runner/Info.plist; 404 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 405 | LIBRARY_SEARCH_PATHS = ( 406 | "$(inherited)", 407 | "$(PROJECT_DIR)/Flutter", 408 | ); 409 | PRODUCT_BUNDLE_IDENTIFIER = yinl.yinl.yinllFlutter; 410 | PRODUCT_NAME = "$(TARGET_NAME)"; 411 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 412 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 413 | SWIFT_VERSION = 4.0; 414 | VERSIONING_SYSTEM = "apple-generic"; 415 | }; 416 | name = Release; 417 | }; 418 | /* End XCBuildConfiguration section */ 419 | 420 | /* Begin XCConfigurationList section */ 421 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 422 | isa = XCConfigurationList; 423 | buildConfigurations = ( 424 | 97C147031CF9000F007C117D /* Debug */, 425 | 97C147041CF9000F007C117D /* Release */, 426 | ); 427 | defaultConfigurationIsVisible = 0; 428 | defaultConfigurationName = Release; 429 | }; 430 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 431 | isa = XCConfigurationList; 432 | buildConfigurations = ( 433 | 97C147061CF9000F007C117D /* Debug */, 434 | 97C147071CF9000F007C117D /* Release */, 435 | ); 436 | defaultConfigurationIsVisible = 0; 437 | defaultConfigurationName = Release; 438 | }; 439 | /* End XCConfigurationList section */ 440 | }; 441 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 442 | } 443 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /yinll_flutter/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 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /yinll_flutter/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 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Yinllo/flutter/5c9ba86cb60381c4b339a7fadffa72e9545afefc/yinll_flutter/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /yinll_flutter/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. -------------------------------------------------------------------------------- /yinll_flutter/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 | -------------------------------------------------------------------------------- /yinll_flutter/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 | -------------------------------------------------------------------------------- /yinll_flutter/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 | yinll_flutter 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 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 | -------------------------------------------------------------------------------- /yinll_flutter/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /yinll_flutter/lib/CustomView/DemoPage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'MyCustomCircle.dart'; 3 | import 'PieData.dart'; 4 | import 'dart:ui'; 5 | 6 | class DemoPage extends StatefulWidget { 7 | @override 8 | State createState() { 9 | return new DemoPageState(); 10 | } 11 | } 12 | 13 | class DemoPageState extends State { 14 | 15 | //数据源 下标 表示当前是PieData哪个对象 16 | int subscript = 0; 17 | //数据源 18 | List mData; 19 | //传递值 20 | PieData pieData; 21 | //当前选中 22 | var currentSelect = 0; 23 | 24 | 25 | ///初始化 控制器 26 | @override 27 | void initState() { 28 | // TODO: implement initState 29 | super.initState(); 30 | 31 | initData(); 32 | 33 | } 34 | 35 | ///空处理 //当整个页面dispose时,记得把控制器也dispose掉,释放内存 36 | @override 37 | void dispose() { 38 | // TODO: implement dispose 39 | super.dispose(); 40 | } 41 | 42 | @override 43 | Widget build(BuildContext context) { 44 | return _buildHeader(); 45 | } 46 | 47 | Widget _buildHeader() { 48 | return new Container( 49 | color: Color(0xfff4f4f4), 50 | height: 200.0, 51 | width: 200.0, 52 | child: new Card( 53 | margin: const EdgeInsets.all(50.0), 54 | child: new Row( 55 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 56 | children: [ 57 | new Column( 58 | mainAxisAlignment: MainAxisAlignment.center, 59 | children: [ 60 | new IconButton( 61 | icon: new Icon(Icons.arrow_left), 62 | color: Colors.green[500], 63 | onPressed: _left, 64 | ), 65 | ], 66 | ), 67 | 68 | new Column( 69 | mainAxisAlignment: MainAxisAlignment.center, 70 | children: [ 71 | new Container( 72 | width: 90.0, 73 | height: 90.0, 74 | padding: const EdgeInsets.only(bottom: 20.0), 75 | child: new MyCustomCircle(mData, pieData, currentSelect), 76 | ), 77 | ], 78 | ), 79 | 80 | new Column( 81 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 82 | children: [ 83 | new IconButton( 84 | icon: new Icon(Icons.arrow_right), 85 | color: Colors.green[500], 86 | onPressed: _changeData, 87 | ), 88 | ], 89 | ), 90 | // 91 | ], 92 | ), 93 | ), 94 | ); 95 | } 96 | 97 | ///点击按钮时 改变显示的内容 98 | 99 | void _left() { 100 | setState(() { 101 | if (subscript > 0) { 102 | --subscript; 103 | --currentSelect; 104 | } 105 | pieData = mData[subscript]; 106 | }); 107 | } 108 | 109 | ///改变饼状图 110 | void _changeData() { 111 | setState(() { 112 | 113 | if (subscript < mData.length) { 114 | ++subscript; 115 | ++currentSelect; 116 | } 117 | pieData = mData[subscript]; 118 | }); 119 | } 120 | 121 | //初始化数据源 122 | void initData() { 123 | mData = new List(); 124 | PieData p1 = new PieData(); 125 | p1.name = 'A'; 126 | p1.price = 'a'; 127 | p1.percentage = 0.1932; 128 | p1.color = Color(0xffff3333); 129 | 130 | pieData = p1; 131 | mData.add(p1); 132 | 133 | PieData p2 = new PieData(); 134 | p2.name = 'B'; 135 | p2.price = 'b'; 136 | p2.percentage = 0.15; 137 | p2.color = Color(0xffccccff); 138 | mData.add(p2); 139 | 140 | PieData p3 = new PieData(); 141 | p3.name = 'C'; 142 | p3.price = 'c'; 143 | p3.percentage = 0.1132; 144 | p3.color = Color(0xffCD00CD); 145 | mData.add(p3); 146 | 147 | PieData p4 = new PieData(); 148 | p4.name = 'D'; 149 | p4.price = 'd'; 150 | p4.percentage = 0.0868; 151 | p4.color = Color(0xffFFA500); 152 | mData.add(p4); 153 | 154 | PieData p5 = new PieData(); 155 | p5.name = 'E'; 156 | p5.price = 'e'; 157 | p5.percentage = 0.18023; 158 | p5.color = Color(0xff40E0D0); 159 | mData.add(p5); 160 | 161 | PieData p6 = new PieData(); 162 | p6.name = 'F'; 163 | p6.price = 'f'; 164 | p6.percentage = 0.12888; 165 | p6.color =Color(0xffFFFF00); 166 | mData.add(p6); 167 | 168 | PieData p7 = new PieData(); 169 | p7.name = 'G'; 170 | p7.price = 'g'; 171 | p7.percentage = 0.0888; 172 | p7.color = Color(0xff00ff66); 173 | mData.add(p7); 174 | 175 | PieData p8 = new PieData(); 176 | p8.name = 'H'; 177 | p8.price = 'h'; 178 | p8.percentage = 0.06; 179 | p8.color = Color(0xffD9D9D9); 180 | mData.add(p8); 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /yinll_flutter/lib/CustomView/MyCustomCircle.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'PieData.dart'; 6 | import 'dart:math'; 7 | 8 | ///自定义 饼状图 9 | /// @author yinl 10 | class MyCustomCircle extends StatelessWidget{ 11 | 12 | //数据源 13 | List datas; 14 | //当前数据对象 15 | PieData data; 16 | var dataSize; 17 | //当前选中 18 | var currentSelect; 19 | 20 | MyCustomCircle(this.datas,this.data,this.currentSelect); 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return CustomPaint( 25 | painter: MyView(datas,data,currentSelect,true) 26 | ); 27 | } 28 | 29 | } 30 | 31 | class MyView extends CustomPainter{ 32 | 33 | //中间文字 34 | var text='111'; 35 | bool isChange=false; 36 | //当前选中的扇形 37 | var currentSelect=0; 38 | 39 | double animValue; 40 | Paint _mPaint; 41 | Paint TextPaint; 42 | int mWidth, mHeight; 43 | num mRadius, mInnerRadius,mBigRadius; 44 | num mStartAngle = 0; 45 | Rect mOval,mBigOval; 46 | List mData; 47 | PieData pieData; 48 | 49 | var startAngles=[]; 50 | 51 | MyView(this.mData,this.pieData,this.currentSelect,this.isChange); 52 | 53 | 54 | @override 55 | void paint(Canvas canvas, Size size) { 56 | 57 | 58 | _mPaint = new Paint(); 59 | TextPaint = new Paint(); 60 | mHeight=100;mWidth=100; 61 | 62 | /// 生成纵轴文字的TextPainter 63 | TextPainter textPainter = TextPainter( 64 | textDirection: TextDirection.ltr, 65 | maxLines: 1, 66 | ); 67 | 68 | 69 | 70 | TextPainter _newVerticalAxisTextPainter(String text) { 71 | return textPainter 72 | ..text = TextSpan( 73 | text: text, 74 | style: new TextStyle( 75 | color: Colors.black, 76 | fontSize: 10.0, 77 | ), 78 | ); 79 | } 80 | 81 | // 正常半径 82 | mRadius = 50.0; 83 | //加大半径 用来绘制被选中的扇形区域 84 | mBigRadius=55.0; 85 | //內园半径 86 | mInnerRadius = mRadius * 0.50; 87 | // 未选中的扇形绘制的矩形区域 88 | mOval = Rect.fromLTRB(-mRadius, -mRadius, mRadius, mRadius); 89 | // 选中的扇形绘制的矩形区域 90 | mBigOval = Rect.fromLTRB(-mBigRadius, -mBigRadius, mBigRadius, mBigRadius); 91 | //当没有数据时 直接返回 92 | if (mData.length == null || mData.length <= 0) { 93 | return; 94 | } 95 | 96 | ///绘制逻辑与Android差不多 97 | canvas.save(); 98 | // 将坐标点移动到View的中心 99 | canvas.translate(50.0, 50.0); 100 | // 1. 画扇形 101 | num startAngle = 0.0; 102 | for (int i = 0; i < mData.length; i++) { 103 | PieData p = mData[i]; 104 | double hudu=p.percentage; 105 | //计算当前偏移量(单位为弧度) 106 | double sweepAngle = 2*pi*hudu; 107 | //画笔的颜色 108 | _mPaint..color = p.color; 109 | if(currentSelect>=0 && i==currentSelect){ 110 | //如果当前为所选中的扇形 则将其半径加大 突出显示 111 | canvas.drawArc(mBigOval, startAngle, sweepAngle, true, _mPaint); 112 | }else{ 113 | // 绘制没被选中的扇形 正常半径 114 | canvas.drawArc(mOval, startAngle, sweepAngle, true, _mPaint); 115 | } 116 | //计算每次开始绘制的弧度 117 | startAngle += sweepAngle ; 118 | } 119 | 120 | // canvas.drawRect(mOval, _mPaint); // 矩形区域 121 | 122 | // 2.画内圆 123 | _mPaint..color = Colors.white; 124 | canvas.drawCircle(Offset.zero, mInnerRadius, _mPaint); 125 | 126 | canvas.restore(); 127 | 128 | //当前百分比值 129 | double percentage = pieData.percentage*100; 130 | // 绘制文字内容 131 | var texts ='${percentage}%'; 132 | var tp = _newVerticalAxisTextPainter(texts)..layout(); 133 | 134 | // Text的绘制起始点 = 可用宽度 - 文字宽度 - 左边距 135 | var textLeft = 35.0; 136 | tp.paint(canvas, Offset(textLeft, 50.0 - tp.height / 2)); 137 | 138 | } 139 | 140 | @override 141 | bool shouldRepaint(CustomPainter oldDelegate) { 142 | return true; 143 | } 144 | } -------------------------------------------------------------------------------- /yinll_flutter/lib/CustomView/PieData.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PieData{ 4 | String name;// 名称 5 | Color color;// 颜色 6 | num percentage;//百分比 7 | var price;//成交额 8 | 9 | 10 | } -------------------------------------------------------------------------------- /yinll_flutter/lib/keyboard/CustomJPasswordFieldWidget.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | import 'package:flutter/cupertino.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'dart:math'; 5 | 6 | 7 | /// 自定义 密码输入框 8 | 9 | class CustomJPasswordField extends StatelessWidget { 10 | 11 | /// 传入当前密码 12 | String data; 13 | CustomJPasswordField(this.data); 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return CustomPaint( 18 | painter: MyCustom(data), 19 | ); 20 | } 21 | } 22 | 23 | class MyCustom extends CustomPainter { 24 | 25 | 26 | String pwdLength; 27 | MyCustom(this.pwdLength); 28 | 29 | 30 | @override 31 | void paint(Canvas canvas, Size size) { 32 | 33 | int PWD_SPACING = 5; 34 | int PWD_SIZE = 5; 35 | int mWidth; 36 | 37 | // 密码长度 38 | int PWD_LENGTH = 6; 39 | 40 | // 密码画笔 41 | Paint mPwdPaint; 42 | Paint mRectPaint; 43 | Rect mRect; 44 | int mInputLength; 45 | 46 | 47 | // 初始化密码画笔   48 | mPwdPaint = new Paint(); 49 | mPwdPaint..color = Colors.black; 50 | 51 | // mPwdPaint.setAntiAlias(true); 52 | // 初始化密码框   53 | mRectPaint = new Paint(); 54 | mRectPaint..color = Color(0xff707070); 55 | 56 | 57 | RRect r = new RRect.fromLTRBR( 58 | 0.0, 0.0, size.width, size.height, new Radius.circular(size.height / 12)); 59 | mRectPaint.style = PaintingStyle.stroke; 60 | canvas.drawRRect(r, mRectPaint); 61 | 62 | 63 | var per = size.width / 6.0; 64 | var offsetX = per; 65 | while (offsetX < size.width) { 66 | canvas.drawLine( 67 | new Offset(offsetX, 0.0), new Offset(offsetX, size.height), mRectPaint); 68 | offsetX += per; 69 | } 70 | 71 | var half = per/2; 72 | var radio = per/8; 73 | 74 | mPwdPaint.style = PaintingStyle.fill; 75 | for(int i =0; i< pwdLength.length && i< 6; i++){ 76 | canvas.drawArc(new Rect.fromLTRB(i*per+half-radio, size.height/2-radio, i*per+half+radio, size.height/2+radio), 0.0, 2*pi, true, mPwdPaint); 77 | } 78 | } 79 | 80 | @override 81 | bool shouldRepaint(CustomPainter oldDelegate) { 82 | return true; 83 | } 84 | 85 | } 86 | -------------------------------------------------------------------------------- /yinll_flutter/lib/keyboard/custom_keyboard_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | 4 | /// 自定义 键盘 按钮 5 | 6 | class CustomKbBtn extends StatefulWidget { 7 | String text; 8 | 9 | CustomKbBtn({Key key, this.text, this.callback}) : super(key: key); 10 | final callback; 11 | 12 | @override 13 | State createState() { 14 | return ButtonState(); 15 | } 16 | } 17 | 18 | class ButtonState extends State { 19 | ///回调函数执行体 20 | var backMethod; 21 | 22 | void back() { 23 | widget.callback('$backMethod'); 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | 29 | MediaQueryData mediaQuery = MediaQuery.of(context); 30 | var _screenWidth = mediaQuery.size.width; 31 | 32 | return new Container( 33 | height:50.0, 34 | width: _screenWidth / 3, 35 | child: new OutlineButton( 36 | // 直角 37 | shape: new RoundedRectangleBorder( 38 | borderRadius: new BorderRadius.circular(0.0)), 39 | // 边框颜色 40 | borderSide: new BorderSide(color: Color(0x10333333)), 41 | child: new Text( 42 | widget.text, 43 | style: new TextStyle(color: Color(0xff333333), fontSize: 20.0), 44 | ), 45 | onPressed: back, 46 | )); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /yinll_flutter/lib/keyboard/keyboard_main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yinll_flutter/keyboard/CustomJPasswordFieldWidget.dart'; 3 | import 'package:yinll_flutter/keyboard/keyboard_widget.dart'; 4 | import 'package:yinll_flutter/keyboard/pay_password.dart'; 5 | 6 | /// 支付密码 + 自定义键盘 7 | 8 | class main_keyboard extends StatefulWidget { 9 | static final String sName = "enter"; 10 | 11 | @override 12 | State createState() { 13 | return new keyboardState(); 14 | } 15 | } 16 | 17 | 18 | class keyboardState extends State { 19 | String pwdData = ''; 20 | 21 | final GlobalKey _scaffoldKey = GlobalKey(); 22 | 23 | VoidCallback _showBottomSheetCallback; 24 | 25 | @override 26 | void initState() { 27 | 28 | _showBottomSheetCallback = _showBottomSheet; 29 | } 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return new Scaffold( 34 | key: _scaffoldKey, 35 | body: _buildContent(context), 36 | ); 37 | } 38 | 39 | Widget _buildContent(BuildContext c) { 40 | return new Container( 41 | width: double.maxFinite, 42 | height: 300.0, 43 | color: Color(0xffffffff), 44 | child: new Column( 45 | children: [ 46 | 47 | new Padding( 48 | padding: const EdgeInsets.only(top: 50.0), 49 | child: new Text( 50 | '请在此输入新支付密码', 51 | style: new TextStyle(fontSize: 18.0, color: Color(0xff333333)), 52 | ), 53 | ), 54 | 55 | ///密码框 56 | new Padding( 57 | padding: const EdgeInsets.only(top: 15.0), 58 | child: _buildPwd(pwdData), 59 | ), 60 | 61 | // new Padding( 62 | // padding: const EdgeInsets.only(top: 20.0), 63 | // child: new Text( 64 | // '不是登录密码或连续数字', 65 | // style: new TextStyle(fontSize: 12.0, color: Color(0xff999999)), 66 | // ), 67 | // ), 68 | 69 | // new Padding( 70 | // padding: const EdgeInsets.only(top: 30.0), //0xffff0303 71 | // child: new Text( 72 | // '密码输入错误,还可输入2次,超出将锁定账户。', 73 | // style: new TextStyle(fontSize: 12.0, color: Color(0xffffffff)), 74 | // ), 75 | // ), 76 | ], 77 | ), 78 | ); 79 | } 80 | 81 | /// 密码键盘 确认按钮 事件 82 | void onAffirmButton() { 83 | 84 | } 85 | 86 | void _onKeyDown(KeyEvent data){ 87 | if (data.isDelete()) { 88 | if (pwdData.length > 0) { 89 | pwdData = pwdData.substring(0, pwdData.length - 1); 90 | setState(() {}); 91 | } 92 | } else if (data.isCommit()) { 93 | if (pwdData.length != 6) { 94 | // Fluttertoast.showToast(msg: "密码不足6位,请重试", gravity: ToastGravity.CENTER); 95 | return; 96 | } 97 | onAffirmButton(); 98 | } else { 99 | if (pwdData.length < 6) { 100 | pwdData += data.key; 101 | } 102 | setState(() {}); 103 | } 104 | } 105 | /// 底部弹出 自定义键盘 下滑消失 106 | void _showBottomSheet() { 107 | setState(() { 108 | // disable the button 109 | _showBottomSheetCallback = null; 110 | }); 111 | _scaffoldKey.currentState 112 | .showBottomSheet((BuildContext context) { 113 | return new MyKeyboard(_onKeyDown); 114 | }) 115 | .closed 116 | .whenComplete(() { 117 | if (mounted) { 118 | setState(() { 119 | // re-enable the button 120 | _showBottomSheetCallback = _showBottomSheet; 121 | }); 122 | } 123 | }); 124 | } 125 | 126 | Widget _buildPwd(var pwd) { 127 | return new GestureDetector( 128 | child: new Container( 129 | width: 250.0, 130 | height:40.0, 131 | // color: Colors.white, 132 | child: new CustomJPasswordField(pwd), 133 | ), 134 | onTap: () { 135 | _showBottomSheetCallback(); 136 | }, 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /yinll_flutter/lib/keyboard/keyboard_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:yinll_flutter/keyboard/pay_password.dart'; 2 | import 'package:yinll_flutter/keyboard/custom_keyboard_button.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | 6 | /// 自定义密码 键盘 7 | 8 | class MyKeyboard extends StatefulWidget { 9 | final callback; 10 | 11 | MyKeyboard(this.callback); 12 | 13 | @override 14 | State createState() { 15 | return new MyKeyboardStat(); 16 | } 17 | } 18 | 19 | class MyKeyboardStat extends State { 20 | final GlobalKey _scaffoldKey = GlobalKey(); 21 | 22 | /// 定义 确定 按钮 接口 暴露给调用方 23 | ///回调函数执行体 24 | var backMethod; 25 | void onCommitChange() { 26 | widget.callback(new KeyEvent("commit")); 27 | } 28 | 29 | void onOneChange(BuildContext cont) { 30 | widget.callback(new KeyEvent("1")); 31 | } 32 | 33 | void onTwoChange(BuildContext cont) { 34 | widget.callback(new KeyEvent("2")); 35 | } 36 | 37 | void onThreeChange(BuildContext cont) { 38 | widget.callback(new KeyEvent("3")); 39 | } 40 | 41 | void onFourChange(BuildContext cont) { 42 | widget.callback(new KeyEvent("4")); 43 | } 44 | 45 | void onFiveChange(BuildContext cont) { 46 | widget.callback(new KeyEvent("5")); 47 | } 48 | 49 | void onSixChange(BuildContext cont) { 50 | widget.callback(new KeyEvent("6")); 51 | } 52 | 53 | void onSevenChange(BuildContext cont) { 54 | widget.callback(new KeyEvent("7")); 55 | } 56 | 57 | void onEightChange(BuildContext cont) { 58 | widget.callback(new KeyEvent("8")); 59 | } 60 | 61 | void onNineChange(BuildContext cont) { 62 | widget.callback(new KeyEvent("9")); 63 | } 64 | 65 | void onZeroChange(BuildContext cont) { 66 | widget.callback(new KeyEvent("0")); 67 | } 68 | 69 | /// 点击删除 70 | void onDeleteChange() { 71 | widget.callback(new KeyEvent("del")); 72 | } 73 | 74 | @override 75 | Widget build(BuildContext context) { 76 | return new Container( 77 | key: _scaffoldKey, 78 | width: double.infinity, 79 | height: 250.0, 80 | color: Colors.white, 81 | child: new Column( 82 | children: [ 83 | new Container( 84 | height:30.0, 85 | color: Colors.white, 86 | alignment: Alignment.center, 87 | child: new Text( 88 | '下滑隐藏', 89 | style: new TextStyle(fontSize: 12.0, color: Color(0xff999999)), 90 | ), 91 | ), 92 | 93 | /// 键盘主体 94 | new Column( 95 | children: [ 96 | /// 第一行 97 | new Row( 98 | children: [ 99 | CustomKbBtn( 100 | text: '1', callback: (val) => onOneChange(context)), 101 | CustomKbBtn( 102 | text: '2', callback: (val) => onTwoChange(context)), 103 | CustomKbBtn( 104 | text: '3', callback: (val) => onThreeChange(context)), 105 | ], 106 | ), 107 | 108 | /// 第二行 109 | new Row( 110 | children: [ 111 | CustomKbBtn( 112 | text: '4', callback: (val) => onFourChange(context)), 113 | CustomKbBtn( 114 | text: '5', callback: (val) => onFiveChange(context)), 115 | CustomKbBtn( 116 | text: '6', callback: (val) => onSixChange(context)), 117 | ], 118 | ), 119 | 120 | /// 第三行 121 | new Row( 122 | children: [ 123 | CustomKbBtn( 124 | text: '7', callback: (val) => onSevenChange(context)), 125 | CustomKbBtn( 126 | text: '8', callback: (val) => onEightChange(context)), 127 | CustomKbBtn( 128 | text: '9', callback: (val) => onNineChange(context)), 129 | ], 130 | ), 131 | 132 | /// 第四行 133 | new Row( 134 | children: [ 135 | CustomKbBtn(text: '删除', callback: (val) => onDeleteChange()), 136 | CustomKbBtn( 137 | text: '0', callback: (val) => onZeroChange(context)), 138 | CustomKbBtn(text: '确定', callback: (val) => onCommitChange()), 139 | ], 140 | ), 141 | ], 142 | ) 143 | ], 144 | ), 145 | ); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /yinll_flutter/lib/keyboard/pay_password.dart: -------------------------------------------------------------------------------- 1 | /// 支符密码 用于 密码输入框和键盘之间进行通信 2 | class KeyEvent { 3 | String key; 4 | 5 | KeyEvent(this.key); 6 | 7 | bool isDelete() => this.key == "del"; 8 | bool isCommit() => this.key == "commit"; 9 | } 10 | -------------------------------------------------------------------------------- /yinll_flutter/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yinll_flutter/CustomView/DemoPage.dart'; 3 | import 'package:yinll_flutter/keyboard/keyboard_main.dart'; 4 | 5 | void main() => runApp(new MyApp()); 6 | 7 | class MyApp extends StatelessWidget { 8 | @override 9 | Widget build(BuildContext context) { 10 | return new MaterialApp( 11 | title: 'Flutter Demo', 12 | theme: new ThemeData( 13 | primarySwatch: Colors.blue, 14 | ), 15 | home: new MyHomePage(title: 'Demo'), 16 | ); 17 | } 18 | } 19 | 20 | class MyHomePage extends StatefulWidget { 21 | MyHomePage({Key key, this.title}) : super(key: key); 22 | 23 | final String title; 24 | 25 | @override 26 | _MyHomePageState createState() => new _MyHomePageState(); 27 | } 28 | 29 | class _MyHomePageState extends State { 30 | void _incrementCounter() { 31 | setState(() {}); 32 | } 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return new Scaffold( 37 | appBar: new AppBar( 38 | title: new Text(widget.title), 39 | ), 40 | body: new Column( 41 | children: [ 42 | new Padding( 43 | padding: const EdgeInsets.only(left: 20.0, top: 20.0), 44 | child: new FlatButton( 45 | color: Colors.greenAccent, 46 | onPressed: () { 47 | Navigator.push( 48 | context, 49 | new MaterialPageRoute( 50 | builder: (context) => new DemoPage())); 51 | }, 52 | child: new Text('自定义饼状图')), 53 | ), 54 | 55 | new Padding( 56 | padding: const EdgeInsets.only(left: 20.0, top: 20.0), 57 | child: new FlatButton( 58 | color: Colors.greenAccent, 59 | onPressed: () { 60 | Navigator.push( 61 | context, 62 | new MaterialPageRoute( 63 | builder: (context) => new main_keyboard())); 64 | }, 65 | child: new Text('支付密码+安全键盘')), 66 | ), 67 | 68 | ], 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /yinll_flutter/lib/net/ApiInterface.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:dio/dio.dart'; 4 | import 'package:http/http.dart'; 5 | import 'package:yinll_flutter/net/NetUtil.dart'; 6 | import 'package:yinll_flutter/net/common_error_handler_utils.dart'; 7 | 8 | /// 所有接口请求 9 | 10 | class ApiInterface { 11 | static final String _API_GET = "user/"; 12 | 13 | static Future> getSmsCode( 14 | String flag, String phoneNum, String vefifyCode) async { 15 | return NetUtil.postJson(_API_GET, 16 | {"flagId": flag, "phone": phoneNum, "vefifyCode": vefifyCode}); 17 | } 18 | 19 | 20 | static final String _API_GET_TEAM_FUND = ''; 21 | static Future> getTeamFund( 22 | LoginInvalidHandler handler) async { 23 | return NetUtil.getJson(_API_GET_TEAM_FUND, {}) 24 | .catchError(handler.loginInvalidHandler); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /yinll_flutter/lib/net/NetUtil.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'dart:io'; 3 | import 'package:dio/dio.dart'; 4 | import 'package:flutter/cupertino.dart'; 5 | 6 | class NetUtil { 7 | static final debug = true; 8 | static BuildContext context = null; 9 | static final host = 'https://www.'; 10 | static final baseUrl = host + '/api/'; 11 | 12 | // ignore: argument_type_not_assignable 13 | static final Dio _dio = new Dio(new BaseOptions( 14 | method: "get", 15 | baseUrl: baseUrl, 16 | connectTimeout: 5000, 17 | receiveTimeout: 5000, 18 | followRedirects: true)); 19 | 20 | /// 代理设置,方便抓包来进行接口调节 21 | // static void setProxy() { 22 | // (_dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) { 23 | // // config the http client 24 | // client.findProxy = (uri) { 25 | // //proxy all request to localhost:8888 26 | // return "PROXY localhost:8888"; 27 | // }; 28 | // // you can also create a new HttpClient to dio 29 | // // return new HttpClient(); 30 | // }; 31 | // } 32 | 33 | static String token; 34 | 35 | static final LogicError unknowError = LogicError(-1, "未知异常"); 36 | 37 | static Future> getJson( 38 | String uri, Map paras) => 39 | _httpJson("get", uri, data: paras).then(logicalErrorTransform); 40 | 41 | static Future> getForm( 42 | String uri, Map paras) => 43 | _httpJson("get", uri, data: paras, dataIsJson: false) 44 | .then(logicalErrorTransform); 45 | 46 | /// 表单方式的post 47 | static Future> postForm( 48 | String uri, Map paras) => 49 | _httpJson("post", uri, data: paras, dataIsJson: false) 50 | .then(logicalErrorTransform); 51 | 52 | /// requestBody (json格式参数) 方式的 post 53 | static Future> postJson( 54 | String uri, Map body) => 55 | _httpJson("post", uri, data: body).then(logicalErrorTransform); 56 | 57 | static Future> deleteJson( 58 | String uri, Map body) => 59 | _httpJson("delete", uri, data: body).then(logicalErrorTransform); 60 | 61 | /// requestBody (json格式参数) 方式的 put 62 | static Future> putJson( 63 | String uri, Map body) => 64 | _httpJson("put", uri, data: body).then(logicalErrorTransform); 65 | 66 | /// 表单方式的 put 67 | static Future> putForm( 68 | String uri, Map body) => 69 | _httpJson("put", uri, data: body, dataIsJson: false) 70 | .then(logicalErrorTransform); 71 | 72 | /// 文件上传 返回json数据为字符串 73 | static Future putFile(String uri, String filePath) { 74 | var name = 75 | filePath.substring(filePath.lastIndexOf("/") + 1, filePath.length); 76 | var suffix = name.substring(name.lastIndexOf(".") + 1, name.length); 77 | FormData formData = new FormData.from({ 78 | "multipartFile": new UploadFileInfo(new File(filePath), name, 79 | contentType: ContentType.parse("image/$suffix")) 80 | }); 81 | 82 | var enToken = token == null ? "" : Uri.encodeFull(token); 83 | return _dio 84 | .put>("$uri?token=$enToken", data: formData) 85 | .then(logicalErrorTransform); 86 | } 87 | 88 | 89 | static Future>> _httpJson( 90 | String method, String uri, 91 | {Map data, bool dataIsJson = true}) { 92 | var enToken = token == null ? "" : Uri.encodeFull(token); 93 | 94 | /// 如果为 get方法,则进行参数拼接 95 | if (method == "get") { 96 | dataIsJson = false; 97 | if (data == null) { 98 | data = new Map(); 99 | } 100 | data["token"] = token; 101 | } 102 | 103 | if (debug) { 104 | print('------$uri'); 105 | print('------$data'); 106 | } 107 | 108 | /// 根据当前 请求的类型来设置 如果是请求体形式则使用json格式 109 | /// 否则则是表单形式的(拼接在url上) 110 | Options op; 111 | if (dataIsJson) { 112 | op = new Options(contentType: ContentType.parse("application/json")); 113 | } else { 114 | op = new Options( 115 | contentType: ContentType.parse("application/x-www-form-urlencoded")); 116 | } 117 | 118 | op.method = method; 119 | 120 | /// 统一带上token 121 | return _dio.request>( 122 | method == "get" ? uri : "$uri?token=$enToken", 123 | data: data, 124 | options: op); 125 | 126 | } 127 | 128 | /// 对请求返回的数据进行统一的处理 129 | /// 如果成功则将我们需要的数据返回出去,否则进异常处理方法,返回异常信息 130 | static Future logicalErrorTransform(Response> resp) { 131 | if (resp.data != null) { 132 | if (resp.data["code"] == 0) { 133 | T realData = resp.data["data"]; 134 | return Future.value(realData); 135 | } 136 | } 137 | 138 | if (debug) { 139 | print('resp--------$resp'); 140 | print('resp.data--------${resp.data}'); 141 | } 142 | LogicError error; 143 | if (resp.data != null && resp.data["code"] != 0) { 144 | if (resp.data['data'] != null) { 145 | /// 失败时 错误提示在 data中时 146 | /// 收到token过期时 直接进入登录页面 147 | Map realData = resp.data["data"]; 148 | error = new LogicError(resp.data["code"], realData['codeMessage']); 149 | } else { 150 | /// 失败时 错误提示在 message中时 151 | error = new LogicError(resp.data["code"], resp.data["message"]); 152 | } 153 | 154 | /// token失效 重新登录 后端定义的code码 155 | if (resp.data["code"] == 10000000) { 156 | // NavigatorUtils.goPwdLogin(context); 157 | 158 | } 159 | if(resp.data["code"] == 80000000){ 160 | //操作逻辑 161 | } 162 | } else { 163 | error = unknowError; 164 | } 165 | return Future.error(error); 166 | } 167 | 168 | /// 获取token 169 | ///获取授权token 170 | static getToken() async { 171 | // String token = await LocalStorage.get(LocalStorage.TOKEN_KEY); 172 | return token; 173 | } 174 | } 175 | 176 | class LogicError { 177 | int errorCode; 178 | String msg; 179 | 180 | LogicError(errorCode, msg) { 181 | this.errorCode = errorCode; 182 | this.msg = msg; 183 | } 184 | } 185 | 186 | enum PostType { json, form, file } 187 | -------------------------------------------------------------------------------- /yinll_flutter/lib/net/common_error_handler_utils.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:yinll_flutter/net/NetUtil.dart'; 5 | 6 | 7 | 8 | class LoginInvalidHandler { 9 | BuildContext currentContext; 10 | LoginInvalidHandler(this.currentContext); 11 | 12 | Future loginInvalidHandler(dynamic errorMsg) { 13 | if (errorMsg != null && 14 | errorMsg is LogicError && 15 | errorMsg.errorCode == 10000) { 16 | // LocalStorage.clearLoginInfo(); 17 | // Fluttertoast.showToast( 18 | // msg: '您的登录已过期,请重新登录', 19 | // gravity: ToastGravity.CENTER, 20 | // timeInSecForIos: 3); 21 | // NavigatorUtils.goPwdLogin(currentContext); 22 | return Future.error(errorMsg); 23 | } 24 | return Future.error(errorMsg); 25 | } 26 | } 27 | 28 | 29 | Future nullFutureHandler(dynamic data){ 30 | return Future.value(null); 31 | } 32 | -------------------------------------------------------------------------------- /yinll_flutter/lib/redux/AppState.dart: -------------------------------------------------------------------------------- 1 | import 'package:yinll_flutter/redux/user.dart'; 2 | import 'package:flutter_redux/flutter_redux.dart'; 3 | import 'package:yinll_flutter/redux/user_reducer.dart'; 4 | 5 | class AppState { 6 | 7 | User userInfo; 8 | 9 | ///构造方法 10 | AppState({this.userInfo}); 11 | 12 | } 13 | 14 | ///创建 Reducer 15 | ///源码中 Reducer 是一个方法 typedef State Reducer(State state, dynamic action); 16 | ///我们自定义了 appReducer 用于创建 store 17 | AppState appReducer(AppState state, action) { 18 | return AppState( 19 | 20 | ///通过 UserReducer 将 GSYState 内的 userInfo 和 action 关联在一起 21 | userInfo: UserReducer(state.userInfo, action), 22 | 23 | 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /yinll_flutter/lib/redux/DemoUseStorePage.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_redux/flutter_redux.dart'; 3 | import 'package:yinll_flutter/redux/AppState.dart'; 4 | import 'package:yinll_flutter/redux/user.dart'; 5 | 6 | class DemoUseStorePage extends StatelessWidget { 7 | @override 8 | Widget build(BuildContext context) { 9 | ///通过 StoreConnector 关联 AppState 中的 User 10 | return new StoreConnector( 11 | ///通过 converter 将 AppState 中的 userInfo返回 12 | converter: (store) => store.state.userInfo, 13 | ///在 userInfo 中返回实际渲染的控件 14 | builder: (context, userInfo) { 15 | return new Scaffold( 16 | appBar: new AppBar( 17 | title: new Text('ooooo'), 18 | ), 19 | body: new Text( 20 | "aaa", 21 | style: Theme.of(context).textTheme.display1, 22 | ), 23 | ); 24 | }, 25 | ); 26 | } 27 | } -------------------------------------------------------------------------------- /yinll_flutter/lib/redux/demo.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_redux/flutter_redux.dart'; 3 | import 'package:yinll_flutter/redux/AppState.dart'; 4 | import 'package:yinll_flutter/redux/user.dart'; 5 | import 'package:yinll_flutter/redux/user_reducer.dart'; 6 | 7 | class Demo extends StatefulWidget{ 8 | 9 | static final String sName = "demo"; 10 | 11 | @override 12 | State createState() { 13 | return new DemoState(); 14 | } 15 | 16 | } 17 | 18 | class DemoState extends State{ 19 | 20 | 21 | User user = User.empty(); 22 | 23 | @override 24 | void initState() { 25 | // TODO: implement initState 26 | super.initState(); 27 | get(); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | 33 | ///通过 StoreConnector 关联 AppState 中的 User 34 | return new StoreConnector( 35 | ///通过 converter 将 AppState 中的 userInfo返回 36 | converter: (store) => store.state.userInfo, 37 | ///在 userInfo 中返回实际渲染的控件 38 | builder: (context, userInfo) { 39 | return new Scaffold( 40 | appBar: new AppBar( 41 | title: new Text('ooooo'), 42 | ), 43 | body: new Column( 44 | children: [ 45 | new Text( 46 | userInfo.phone==null ? "aaa" : userInfo.name, 47 | style: Theme.of(context).textTheme.display1, 48 | ), 49 | 50 | new Padding(padding: const EdgeInsets.only(top: 50.0)), 51 | 52 | new GestureDetector( 53 | child: new Text('dianji'), 54 | onTap: (){ 55 | StoreConnector( 56 | converter: (store) { 57 | return () => store.dispatch(new UpdateUserAction(user)); 58 | }, 59 | builder: (context, callback) 60 | { 61 | return FloatingActionButton( 62 | onPressed: callback, 63 | child: Icon 64 | (Icons.add), 65 | ); 66 | 67 | }); 68 | }, 69 | ) 70 | 71 | ], 72 | ) 73 | ); 74 | }, 75 | ); 76 | 77 | } 78 | 79 | void get(){ 80 | 81 | setState(() { 82 | 83 | user.name='1111'; 84 | user.code='1111'; 85 | user.photo='1111'; 86 | user.phone='1111'; 87 | ///通过 dispatch UpdateUserAction,可以更新State 88 | StoreProvider.of(context).dispatch(new UpdateUserAction(user)); 89 | }); 90 | } 91 | 92 | 93 | } -------------------------------------------------------------------------------- /yinll_flutter/lib/redux/redux_main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_redux/flutter_redux.dart'; 3 | import 'package:redux/redux.dart'; 4 | import 'package:yinll_flutter/redux/AppState.dart'; 5 | import 'package:yinll_flutter/redux/DemoUseStorePage.dart'; 6 | import 'package:yinll_flutter/redux/demo.dart'; 7 | import 'package:yinll_flutter/redux/user.dart'; 8 | 9 | void main() { 10 | runApp(new FlutterReduxApp()); 11 | } 12 | 13 | class FlutterReduxApp extends StatelessWidget { 14 | /// 创建Store,引用 AppState 中的 appReducer 创建 Reducer 15 | /// initialState 初始化 State 16 | final store = new Store( 17 | appReducer, 18 | initialState: new AppState( 19 | userInfo: User.empty(), 20 | ) 21 | ); 22 | 23 | FlutterReduxApp({Key key}) : super(key: key); 24 | 25 | @override 26 | Widget build(BuildContext context) { 27 | /// 通过 StoreProvider 应用 store 28 | return new StoreProvider( 29 | store: store, 30 | child: new StoreBuilder(builder: (context, store) { 31 | return new MaterialApp( 32 | theme: new ThemeData( 33 | primarySwatch: Colors.blue, 34 | ), 35 | home: new Demo(), 36 | // home: DemoUseStorePage(), 37 | 38 | ); 39 | }), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /yinll_flutter/lib/redux/user.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | class User{ 4 | String name; 5 | String phone; 6 | String code; 7 | String photo; 8 | 9 | User.empty(); 10 | 11 | } -------------------------------------------------------------------------------- /yinll_flutter/lib/redux/user_reducer.dart: -------------------------------------------------------------------------------- 1 | import 'package:redux/redux.dart'; 2 | import 'package:yinll_flutter/redux/user.dart'; 3 | 4 | /// redux 的 combineReducers, 通过 TypedReducer 将 UpdateUserAction 与 reducers 关联起来 5 | final UserReducer = combineReducers([ 6 | TypedReducer(_updateLoaded), 7 | ]); 8 | 9 | /// 如果有 UpdateUserAction 发起一个请求时 10 | /// 就会调用到 _updateLoaded 11 | /// _updateLoaded 这里接受一个新的userInfo,并返回 12 | User _updateLoaded(User user, action) { 13 | user = action.userInfo; 14 | return user; 15 | } 16 | 17 | ///定一个 UpdateUserAction ,用于发起 userInfo 的的改变 18 | ///类名随你喜欢定义,只要通过上面TypedReducer绑定就好 19 | class UpdateUserAction { 20 | final User userInfo; 21 | 22 | UpdateUserAction(this.userInfo); 23 | } 24 | -------------------------------------------------------------------------------- /yinll_flutter/lib/route_demo/Screen1.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yinll_flutter/route_demo/Screen2.dart'; 3 | import 'package:yinll_flutter/route_demo/Screen3.dart'; 4 | import 'package:yinll_flutter/route_demo/Screen4.dart'; 5 | 6 | 7 | void main() { 8 | runApp( 9 | new MaterialApp( 10 | home: new Screen1(), 11 | routes: { 12 | '/screen1': (BuildContext context) => new Screen1(), 13 | '/screen2' : (BuildContext context) => new Screen2(), 14 | '/screen3' : (BuildContext context) => new Screen3(), 15 | '/screen4' : (BuildContext context) => new Screen4() 16 | }, 17 | ) 18 | ); 19 | } 20 | 21 | class Screen1 extends StatelessWidget { 22 | 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | print("Screen1"); 27 | 28 | return new Scaffold( 29 | appBar: new AppBar( 30 | title: new Text("Screen 1"), 31 | 32 | ), 33 | body: new Center( 34 | child: new Column( 35 | mainAxisSize: MainAxisSize.min, 36 | crossAxisAlignment: CrossAxisAlignment.center, 37 | children: [ 38 | new RaisedButton(onPressed:(){ 39 | Navigator.of(context).pushNamed('/screen2'); 40 | } ,child: new Text("Push to Screen 2"),), 41 | new SizedBox(height: 10.0,), 42 | 43 | new RaisedButton( 44 | onPressed: (){ 45 | print(Navigator.of(context).canPop().toString()); 46 | }, 47 | child: new Text("Can Pop"),), 48 | new SizedBox(height: 10.0,), 49 | 50 | new RaisedButton( 51 | onPressed: (){ 52 | Navigator.of(context).maybePop(); 53 | }, 54 | child: new Text("Maybe Pop"),), 55 | new SizedBox(height: 10.0,), 56 | 57 | new RaisedButton( 58 | onPressed: (){ 59 | Navigator.of(context).pop(); 60 | }, 61 | child: new Text("Pop"),) 62 | ], 63 | ), 64 | ) , 65 | ); 66 | } 67 | } -------------------------------------------------------------------------------- /yinll_flutter/lib/route_demo/Screen2.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yinll_flutter/route_demo/Screen5.dart'; 3 | 4 | class Screen2 extends StatelessWidget { 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | 9 | print("Screen2"); 10 | 11 | 12 | return new Scaffold( 13 | appBar: new AppBar( 14 | title: new Text("Screen 2"), 15 | automaticallyImplyLeading: true, 16 | ), 17 | body: new Center( 18 | child: new Column( 19 | mainAxisSize: MainAxisSize.min, 20 | crossAxisAlignment: CrossAxisAlignment.center, 21 | children: [ 22 | new RaisedButton(onPressed: () { 23 | Navigator.of(context).pushNamed('/screen3'); 24 | }, 25 | child: new Text("Push to Screen 3"),), 26 | new SizedBox(height: 10.0,), 27 | 28 | 29 | new RaisedButton(onPressed:(){ 30 | Navigator.of(context).pushNamed('/screen1'); 31 | } ,child: new Text("Push to Screen 1 instead of Pop"),), 32 | new SizedBox(height: 10.0,), 33 | 34 | new RaisedButton(onPressed: () { 35 | String userName = "John Doe"; 36 | Navigator.push( 37 | context, 38 | new MaterialPageRoute( 39 | builder: (BuildContext context) => 40 | new Screen5(userName))); 41 | }, 42 | child: new Text("Push to Screen 5 using MaterialPageRoute"),), 43 | 44 | ], 45 | ), 46 | ) , 47 | ); 48 | 49 | } 50 | } -------------------------------------------------------------------------------- /yinll_flutter/lib/route_demo/Screen3.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:yinll_flutter/route_demo/Screen4.dart'; 3 | 4 | class Screen3 extends StatelessWidget { 5 | 6 | @override 7 | Widget build(BuildContext context) { 8 | 9 | print("Screen3"); 10 | 11 | return new Scaffold( 12 | appBar: new AppBar( 13 | title: new Text("Screen 3"), 14 | 15 | ), 16 | body: new Center( 17 | child: new Column( 18 | mainAxisSize: MainAxisSize.min, 19 | crossAxisAlignment: CrossAxisAlignment.center, 20 | children: [ 21 | new RaisedButton( 22 | onPressed: (){ 23 | print(Navigator.of(context).canPop().toString()); 24 | }, 25 | child: new Text("Can Pop"),), 26 | new SizedBox(height: 10.0,), 27 | 28 | 29 | new RaisedButton( 30 | onPressed: (){ 31 | Navigator.of(context).maybePop(); 32 | }, 33 | child: new Text("Maybe Pop"),), 34 | new SizedBox(height: 10.0,), 35 | 36 | 37 | new RaisedButton( 38 | onPressed: (){ 39 | Navigator.of(context).pushReplacementNamed('/screen4'); 40 | }, 41 | child: new Text("Push Replacement Named"),), 42 | new SizedBox(height: 10.0,), 43 | 44 | 45 | new RaisedButton( 46 | onPressed: (){ 47 | Navigator.popAndPushNamed(context, '/screen4'); 48 | }, 49 | child: new Text("pop and Push Named"),), 50 | new SizedBox(height: 10.0,), 51 | 52 | 53 | new RaisedButton( 54 | onPressed: (){ 55 | Navigator.of(context).pushNamedAndRemoveUntil('/screen4', ModalRoute.withName('/screen1')); 56 | // Navigator.of(context).pushNamedAndRemoveUntil('/screen4', (Route route) => false); 57 | // Navigator.pushNamedAndRemoveUntil(context, "/screen4",ModalRoute.withName('/screen1')); 58 | }, 59 | child: new Text("Push Named and Remove Until"),), 60 | new SizedBox(height: 10.0,), 61 | 62 | 63 | new RaisedButton( 64 | onPressed: (){ 65 | Navigator.of(context).pushAndRemoveUntil(new MaterialPageRoute( builder: (BuildContext context) => new Screen4()), ModalRoute.withName('/screen1')); 66 | }, 67 | child: new Text("Push and Remove Until"),), 68 | new SizedBox(height: 10.0,), 69 | 70 | 71 | 72 | 73 | 74 | new RaisedButton(onPressed:(){ 75 | Navigator.of(context).pushNamed('/screen4'); 76 | } ,child: new Text("Push to Screen 4"),), 77 | new SizedBox(height: 10.0,), 78 | 79 | 80 | new RaisedButton( 81 | onPressed: (){ 82 | Navigator.push(context, new PageRouteBuilder( 83 | opaque: false, 84 | pageBuilder: (BuildContext context, _, __) { 85 | return new Scaffold( 86 | body: new Center( 87 | child: new Container( 88 | child: new Center(child: new Text('My PageRoute'))), 89 | ), 90 | ); 91 | }, 92 | transitionsBuilder: (___, Animation animation, ____, Widget child) { 93 | return new FadeTransition( 94 | opacity: animation, 95 | child: new RotationTransition( 96 | turns: new Tween(begin: 0.5, end: 1.0).animate(animation), 97 | child: child, 98 | ), 99 | ); 100 | } 101 | )); 102 | }, 103 | child: new Text("Page Route Builder"),), 104 | 105 | 106 | ], 107 | ), 108 | ) , 109 | ); 110 | 111 | } 112 | } -------------------------------------------------------------------------------- /yinll_flutter/lib/route_demo/Screen4.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | 4 | class Screen4 extends StatelessWidget { 5 | 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | print("Screen4"); 10 | 11 | return new Scaffold( // 1 12 | appBar: new AppBar( //2 13 | title: new Text("Screen 4"), 14 | 15 | ), 16 | body: new Center( // 3 17 | child: new Column( 18 | mainAxisSize: MainAxisSize.min, 19 | crossAxisAlignment: CrossAxisAlignment.center, 20 | children: [ 21 | new RaisedButton( 22 | onPressed: (){ 23 | Navigator.popUntil(context, ModalRoute.withName('/screen2')); 24 | }, 25 | child: new Text("popUntil"),), 26 | new SizedBox(height: 10.0,), 27 | 28 | new RaisedButton(onPressed: ()async{ 29 | String value = await Navigator.push(context, new MaterialPageRoute( 30 | builder: (BuildContext context) { 31 | return new Center( 32 | child: new GestureDetector( 33 | child: new Text('OK'), 34 | onTap: () { Navigator.pop(context, "Audio1"); } 35 | ), 36 | ); 37 | } 38 | ) 39 | ); 40 | print(value); 41 | 42 | }, 43 | child: new Text("Return"),) 44 | 45 | ], 46 | ), 47 | ) , 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /yinll_flutter/lib/route_demo/Screen5.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | 4 | class Screen5 extends StatelessWidget { 5 | 6 | final String userName; 7 | Screen5(this.userName); 8 | @override 9 | Widget build(BuildContext context) { 10 | 11 | print("Screen5"); 12 | 13 | 14 | return new Scaffold( 15 | appBar: new AppBar( 16 | title: new Text("Screen 5"), 17 | automaticallyImplyLeading: true, 18 | ), 19 | body: new Center( 20 | child: new Column( 21 | mainAxisSize: MainAxisSize.min, 22 | crossAxisAlignment: CrossAxisAlignment.center, 23 | children: [ 24 | new Text("Hi " + userName), 25 | ], 26 | ), 27 | ) , 28 | ); 29 | 30 | } 31 | } -------------------------------------------------------------------------------- /yinll_flutter/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: yinll_flutter 2 | description: Github Application 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.0+1 11 | 12 | environment: 13 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 14 | 15 | dependencies: 16 | flutter: 17 | sdk: flutter 18 | 19 | # The following adds the Cupertino Icons font to your application. 20 | # Use with the CupertinoIcons class for iOS style icons. 21 | cupertino_icons: ^0.1.2 22 | 23 | # flutter_redux: ^0.5.2 24 | 25 | shared_preferences: ^0.4.2 26 | flutter_redux: ^0.5.2 27 | # 网络框架 28 | dio: 2.1.0 29 | 30 | dev_dependencies: 31 | flutter_test: 32 | sdk: flutter 33 | 34 | 35 | # For information on the generic Dart part of this file, see the 36 | # following page: https://www.dartlang.org/tools/pub/pubspec 37 | 38 | # The following section is specific to Flutter. 39 | flutter: 40 | 41 | # The following line ensures that the Material Icons font is 42 | # included with your application, so that you can use the icons in 43 | # the material Icons class. 44 | uses-material-design: true 45 | 46 | # To add assets to your application, add an assets section, like this: 47 | # assets: 48 | # - images/a_dot_burr.jpeg 49 | # - images/a_dot_ham.jpeg 50 | 51 | # An image asset can refer to one or more resolution-specific "variants", see 52 | # https://flutter.io/assets-and-images/#resolution-aware. 53 | 54 | # For details regarding adding assets from package dependencies, see 55 | # https://flutter.io/assets-and-images/#from-packages 56 | 57 | # To add custom fonts to your application, add a fonts section here, 58 | # in this "flutter" section. Each entry in this list should have a 59 | # "family" key with the font family name, and a "fonts" key with a 60 | # list giving the asset and other descriptors for the font. For 61 | # example: 62 | # fonts: 63 | # - family: Schyler 64 | # fonts: 65 | # - asset: fonts/Schyler-Regular.ttf 66 | # - asset: fonts/Schyler-Italic.ttf 67 | # style: italic 68 | # - family: Trajan Pro 69 | # fonts: 70 | # - asset: fonts/TrajanPro.ttf 71 | # - asset: fonts/TrajanPro_Bold.ttf 72 | # weight: 700 73 | # 74 | # For details regarding fonts from package dependencies, 75 | # see https://flutter.io/custom-fonts/#from-packages 76 | -------------------------------------------------------------------------------- /yinll_flutter/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:yinll_flutter/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(new MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------