├── res └── values │ └── strings_en.arb ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── 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 │ │ │ │ └── drawable │ │ │ │ │ └── launch_background.xml │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── flutter_ui │ │ │ │ │ └── MainActivity.java │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── AppDelegate.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── 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-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── main.m │ ├── AppDelegate.m │ ├── Info.plist │ └── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner.xcodeproj │ ├── project.xcworkspace │ └── contents.xcworkspacedata │ ├── xcshareddata │ └── xcschemes │ │ └── Runner.xcscheme │ └── project.pbxproj ├── assets ├── flash.jpg ├── ic_merchant_home.png └── ic_edit_text_clear.png ├── lib ├── widget │ ├── flutter_ui.dart │ ├── clear_textfield_widget.dart │ ├── slide_indicator.dart │ ├── float_widget.dart │ ├── slide_button.dart │ ├── popup_window.dart │ ├── arc_progress_bar.dart │ └── verification_code_widget.dart ├── page │ ├── arc_progress_bar_page.dart │ ├── slide_indicator_page.dart │ ├── slide_button_page.dart │ ├── clear_textfield_page.dart │ └── popup_page.dart ├── main.dart ├── utils │ └── dash_path.dart └── generated │ └── i18n.dart ├── .metadata ├── README.md ├── test └── widget_test.dart ├── .gitignore ├── pubspec.yaml └── pubspec.lock /res/values/strings_en.arb: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /assets/flash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/assets/flash.jpg -------------------------------------------------------------------------------- /assets/ic_merchant_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/assets/ic_merchant_home.png -------------------------------------------------------------------------------- /assets/ic_edit_text_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/assets/ic_edit_text_clear.png -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhangyujiu/flutter_ui/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/widget/flutter_ui.dart: -------------------------------------------------------------------------------- 1 | export 'arc_progress_bar.dart'; 2 | export 'clear_textfield_widget.dart'; 3 | export 'float_widget.dart'; 4 | export 'slide_button.dart'; 5 | export 'slide_indicator.dart'; 6 | export 'verification_code_widget.dart'; 7 | export 'popup_window.dart'; -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.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: 8661d8aecd626f7f57ccbcb735553edc05a2e713 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/example/flutter_ui/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.flutter_ui; 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 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter_ui 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.io/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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:flutter_ui/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(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 | -------------------------------------------------------------------------------- /lib/page/arc_progress_bar_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_ui/widget/arc_progress_bar.dart'; 3 | 4 | class ArcProgressBarPage extends StatefulWidget { 5 | @override 6 | State createState() { 7 | return _ArcProgressBarPageState(); 8 | } 9 | } 10 | 11 | class _ArcProgressBarPageState extends State { 12 | ProgressController controller; 13 | 14 | @override 15 | void initState() { 16 | super.initState(); 17 | controller = ProgressController(); 18 | } 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return Scaffold( 23 | appBar: AppBar( 24 | title: Text("ArcProgressBar"), 25 | ), 26 | body: Column( 27 | children: [ 28 | Center( 29 | child: ArcProgressBar( 30 | radius: 80, 31 | maxProgress: 1000, 32 | initProgress: 80, 33 | controller: controller, 34 | ringColor: Colors.blue, 35 | progressColor: Colors.red, 36 | ), 37 | ), 38 | RaisedButton( 39 | onPressed: () { 40 | controller.changeProgress(controller.value + 80); 41 | }, 42 | child: Text("Add"), 43 | ), 44 | RaisedButton( 45 | onPressed: () { 46 | controller.changeProgress(0); 47 | }, 48 | child: Text("Reset"), 49 | ), 50 | ], 51 | ), 52 | ); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | -------------------------------------------------------------------------------- /lib/page/slide_indicator_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_ui/widget/slide_indicator.dart'; 3 | 4 | class SlideIndicatorPage extends StatefulWidget { 5 | @override 6 | State createState() { 7 | return _SlideIndicatorPageState(); 8 | } 9 | } 10 | 11 | class _SlideIndicatorPageState extends State { 12 | PageController _controller; 13 | 14 | @override 15 | void initState() { 16 | super.initState(); 17 | _controller = PageController(initialPage: 0); 18 | } 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return Scaffold( 23 | appBar: AppBar( 24 | title: Text("SlideIndicator"), 25 | ), 26 | body: Container( 27 | child: Stack( 28 | children: [ 29 | PageView( 30 | controller: _controller, 31 | children: [ 32 | Image.asset("assets/flash.jpg",fit: BoxFit.fill,), 33 | Image.asset("assets/flash.jpg",fit: BoxFit.fill,), 34 | Image.asset("assets/flash.jpg",fit: BoxFit.fill,), 35 | Image.asset("assets/flash.jpg",fit: BoxFit.fill,), 36 | ], 37 | ), 38 | Container( 39 | alignment: Alignment.bottomCenter, 40 | padding: EdgeInsets.only(bottom: 10), 41 | child: SlideIndicator( 42 | count: 4, 43 | controller: _controller, 44 | ), 45 | ) 46 | ], 47 | ), 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /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 | flutter_ui 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /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 28 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 "com.example.flutter_ui" 37 | minSdkVersion 16 38 | targetSdkVersion 28 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 | -------------------------------------------------------------------------------- /lib/page/slide_button_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_ui/widget/slide_button.dart'; 3 | import 'package:fluttertoast/fluttertoast.dart'; 4 | 5 | class SlideButtonPage extends StatefulWidget { 6 | @override 7 | State createState() { 8 | return _SlideButtonPageState(); 9 | } 10 | } 11 | class _SlideButtonPageState extends State { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar( 16 | title: Text("SlideButton"), 17 | ), 18 | body: ListView( 19 | children: getSlides(), 20 | ), 21 | ); 22 | } 23 | 24 | List list; 25 | 26 | List getSlides() { 27 | list = List(); 28 | for (var i = 0; i < 10; i++) { 29 | var key = GlobalKey(); 30 | var slide = SlideButton( 31 | key: key, 32 | singleButtonWidth: 80, 33 | onSlideStarted: (){ 34 | list.forEach((slide){ 35 | if(slide.key!=key){ 36 | slide.key.currentState?.close(); 37 | } 38 | }); 39 | }, 40 | child: Container( 41 | color: Colors.white, 42 | child: ListTile( 43 | title: Text("测试测试测试测试测试测试测试测试"), 44 | ), 45 | ), 46 | buttons: [ 47 | buildAction(key, "置顶", Colors.grey[400], () { 48 | Fluttertoast.showToast(msg: "置顶"); 49 | key.currentState.close(); 50 | }), 51 | buildAction(key, "标为未读", Colors.amber, () { 52 | Fluttertoast.showToast(msg: "标为未读"); 53 | key.currentState.close(); 54 | }), 55 | buildAction(key, "删除", Colors.red, () { 56 | Fluttertoast.showToast(msg: "删除"); 57 | key.currentState.close(); 58 | }), 59 | ], 60 | ); 61 | list.add(slide); 62 | } 63 | return list; 64 | } 65 | 66 | InkWell buildAction(GlobalKey key, String text, Color color, 67 | GestureTapCallback tap) { 68 | 69 | return InkWell( 70 | onTap: tap, 71 | child: Container( 72 | alignment: Alignment.center, 73 | width: 80, 74 | color: color, 75 | child: Text(text, 76 | style: TextStyle( 77 | color: Colors.white, 78 | )), 79 | ), 80 | ); 81 | } 82 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter/services.dart'; 6 | import 'package:flutter_ui/page/arc_progress_bar_page.dart'; 7 | import 'package:flutter_ui/page/clear_textfield_page.dart'; 8 | import 'package:flutter_ui/page/popup_page.dart'; 9 | import 'package:flutter_ui/page/slide_button_page.dart'; 10 | import 'package:flutter_ui/page/slide_indicator_page.dart'; 11 | 12 | void main() { 13 | runApp(MyApp()); 14 | if (Platform.isAndroid) { 15 | // 以下两行 设置android状态栏为透明的沉浸。写在组件渲染之后,是为了在渲染后进行set赋值,覆盖状态栏,写在渲染之前MaterialApp组件会覆盖掉这个值。 16 | SystemUiOverlayStyle systemUiOverlayStyle = 17 | SystemUiOverlayStyle(statusBarColor: Colors.transparent); 18 | SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle); 19 | } 20 | } 21 | 22 | class MyApp extends StatelessWidget { 23 | @override 24 | Widget build(BuildContext context) { 25 | return MaterialApp( 26 | title: 'Flutter UI', 27 | theme: ThemeData( 28 | primarySwatch: Colors.blue, 29 | ), 30 | home: MainPage(), 31 | ); 32 | } 33 | } 34 | 35 | class MainPage extends StatefulWidget { 36 | @override 37 | State createState() { 38 | return _MainPageState(); 39 | } 40 | } 41 | 42 | class _MainPageState extends State { 43 | 44 | @override 45 | void initState() { 46 | super.initState(); 47 | //在 initState 方法中获取 BuildContext 48 | Future.delayed(Duration(seconds: 0),(){ 49 | print(MediaQuery.of(context).size); 50 | }); 51 | } 52 | 53 | @override 54 | Widget build(BuildContext context) { 55 | return Scaffold( 56 | appBar: AppBar( 57 | title: Text("Flutter UI"), 58 | ), 59 | body: ListView( 60 | children: [ 61 | getItem(context, "侧滑删除", SlideButtonPage()), 62 | getItem(context, "进度条", ArcProgressBarPage()), 63 | getItem(context, "PageView指示器", SlideIndicatorPage()), 64 | getItem(context, "ClearTextField", ClearTextFieldPage()), 65 | getItem(context, "PopupPage", PopupPage()), 66 | ], 67 | )); 68 | } 69 | 70 | ListTile getItem(BuildContext context, String title, Widget widget) { 71 | return ListTile( 72 | title: Text(title), 73 | onTap: () { 74 | Navigator.push( 75 | context, CupertinoPageRoute(builder: (context) => widget)); 76 | }, 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/widget/clear_textfield_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/services.dart'; 3 | 4 | class ClearTextField extends StatefulWidget { 5 | TextStyle textStyle; 6 | InputDecoration decoration; 7 | TextEditingController controller; 8 | bool obscureText; 9 | TextInputType keyboardType; 10 | int maxLength; 11 | Image image; 12 | 13 | ClearTextField( 14 | {this.textStyle, 15 | this.decoration, 16 | @required this.controller, 17 | this.obscureText = false, 18 | this.maxLength, 19 | this.keyboardType = TextInputType.text, 20 | this.image}); 21 | 22 | @override 23 | State createState() { 24 | return _ClearTextFieldState(); 25 | } 26 | } 27 | 28 | class _ClearTextFieldState extends State { 29 | bool isShow = false; 30 | 31 | FocusNode _focusNode; 32 | 33 | @override 34 | void initState() { 35 | super.initState(); 36 | 37 | _focusNode = FocusNode(); 38 | _focusNode.addListener(() { 39 | setState(() { 40 | isShow = _focusNode.hasFocus && widget.controller.value.text.isNotEmpty; 41 | }); 42 | }); 43 | widget.controller.addListener(() { 44 | setState(() { 45 | isShow = _focusNode.hasFocus && widget.controller.value.text.isNotEmpty; 46 | }); 47 | }); 48 | 49 | if (widget.image == null) { 50 | widget.image = Image.asset( 51 | "assets/ic_edit_text_clear.png", 52 | width: 20, 53 | height: 20, 54 | ); 55 | } 56 | } 57 | 58 | @override 59 | Widget build(BuildContext context) { 60 | return Stack( 61 | children: [ 62 | TextField( 63 | focusNode: _focusNode, 64 | controller: widget.controller, 65 | style: widget.textStyle, 66 | inputFormatters: [ 67 | LengthLimitingTextInputFormatter( 68 | widget.maxLength == null ? 10000 : widget.maxLength) 69 | ], 70 | decoration: widget.decoration, 71 | keyboardType: widget.keyboardType, 72 | obscureText: widget.obscureText), 73 | Positioned( 74 | top: 1, 75 | bottom: 1, 76 | right: 10, 77 | child: Offstage( 78 | offstage: !isShow, 79 | child: GestureDetector( 80 | child: widget.image, 81 | onTap: () { 82 | widget.controller.text = ""; 83 | }, 84 | ), 85 | ), 86 | ) 87 | ], 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /lib/page/clear_textfield_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_ui/widget/clear_textfield_widget.dart'; 3 | 4 | class ClearTextFieldPage extends StatefulWidget { 5 | @override 6 | State createState() { 7 | return _ClearTextFieldPageState(); 8 | } 9 | } 10 | 11 | class _ClearTextFieldPageState extends State { 12 | TextEditingController controller; 13 | TextEditingController controller1; 14 | 15 | @override 16 | void initState() { 17 | super.initState(); 18 | controller = TextEditingController(); 19 | controller1 = TextEditingController(); 20 | } 21 | @override 22 | Widget build(BuildContext context) { 23 | return Center( 24 | child: Scaffold( 25 | appBar: AppBar( 26 | title: Text("ClearTextField"), 27 | ), 28 | body: Column( 29 | children: [ 30 | Container( 31 | margin: EdgeInsets.all(10), 32 | decoration: BoxDecoration( 33 | border: Border.all(color: Colors.grey), 34 | borderRadius: BorderRadius.circular(4.0)), 35 | child: ClearTextField( 36 | image: Image.asset( 37 | "assets/ic_edit_text_clear.png", 38 | width: 20, 39 | height: 20, 40 | ), 41 | controller: controller, 42 | textStyle: TextStyle(color: Colors.black87, fontSize: 14), 43 | decoration: InputDecoration( 44 | border: InputBorder.none, 45 | hintText: "请输入账号", 46 | contentPadding: EdgeInsets.all(10), 47 | hintStyle: TextStyle(color: Colors.grey, fontSize: 14)), 48 | ), 49 | ), 50 | Container( 51 | margin: EdgeInsets.all(10), 52 | decoration: BoxDecoration( 53 | border: Border.all(color: Colors.grey), 54 | borderRadius: BorderRadius.circular(4.0)), 55 | child: ClearTextField( 56 | image: Image.asset( 57 | "assets/ic_edit_text_clear.png", 58 | width: 20, 59 | height: 20, 60 | ), 61 | controller: controller1, 62 | obscureText: true, 63 | textStyle: TextStyle(color: Colors.black87, fontSize: 14), 64 | decoration: InputDecoration( 65 | border: InputBorder.none, 66 | hintText: "请输入密码", 67 | contentPadding: EdgeInsets.all(10), 68 | hintStyle: TextStyle(color: Colors.grey, fontSize: 14)), 69 | ), 70 | ), 71 | ], 72 | ), 73 | ), 74 | ); 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_ui 2 | description: A new Flutter project. 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 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | fluttertoast: ^3.0.3 27 | 28 | dev_dependencies: 29 | flutter_test: 30 | sdk: flutter 31 | 32 | 33 | # For information on the generic Dart part of this file, see the 34 | # following page: https://www.dartlang.org/tools/pub/pubspec 35 | 36 | # The following section is specific to Flutter. 37 | flutter: 38 | 39 | # The following line ensures that the Material Icons font is 40 | # included with your application, so that you can use the icons in 41 | # the material Icons class. 42 | uses-material-design: true 43 | 44 | # To add assets to your application, add an assets section, like this: 45 | # assets: 46 | # - images/a_dot_burr.jpeg 47 | # - images/a_dot_ham.jpeg 48 | assets: 49 | - assets/ 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 | -------------------------------------------------------------------------------- /lib/widget/slide_indicator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SlideIndicator extends StatefulWidget { 4 | int count = 0; 5 | double spacing; 6 | double radius; 7 | PageController controller; 8 | Color normalColor; 9 | Color selectColor; 10 | 11 | SlideIndicator( 12 | {@required this.count, 13 | this.spacing = 8, 14 | this.radius = 4, 15 | @required this.controller, 16 | this.normalColor = Colors.grey, 17 | this.selectColor = Colors.red}) 18 | : assert(count > 0); 19 | 20 | @override 21 | State createState() { 22 | return _SlideIndicatorState(); 23 | } 24 | } 25 | 26 | class _SlideIndicatorState extends State { 27 | double offset = 0; 28 | double width; 29 | double totalWidth; 30 | 31 | @override 32 | void initState() { 33 | super.initState(); 34 | width = widget.radius * 2 * widget.count + 35 | widget.spacing * (widget.count - 1) - 36 | widget.radius * 2; 37 | } 38 | @override 39 | void didChangeDependencies() { 40 | super.didChangeDependencies(); 41 | totalWidth = MediaQuery.of(context).size.width * (widget.count - 1); 42 | widget.controller.addListener(() { 43 | offset = widget.controller.offset * width / totalWidth; 44 | setState(() {}); 45 | }); 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | return CustomPaint( 51 | size: Size(width, 50), 52 | painter: SlideIndicatorPainter( 53 | count: widget.count, 54 | spacing: widget.spacing, 55 | radius: widget.radius, 56 | offset: offset, 57 | normalColor: widget.normalColor, 58 | selectColor: widget.selectColor), 59 | ); 60 | } 61 | } 62 | 63 | class SlideIndicatorPainter extends CustomPainter { 64 | int count = 0; 65 | double spacing; 66 | double radius; 67 | double offset; 68 | Color normalColor; 69 | Color selectColor; 70 | 71 | SlideIndicatorPainter( 72 | {this.count, 73 | this.spacing, 74 | this.radius, 75 | this.offset = 0, 76 | this.normalColor, 77 | this.selectColor}); 78 | 79 | @override 80 | void paint(Canvas canvas, Size size) { 81 | var buttonPointPainter = Paint() 82 | ..isAntiAlias = true 83 | ..color = normalColor 84 | ..style = PaintingStyle.fill 85 | ..strokeCap = StrokeCap.round; 86 | var slidePointPainter = Paint() 87 | ..isAntiAlias = true 88 | ..color = selectColor 89 | ..style = PaintingStyle.fill 90 | ..strokeCap = StrokeCap.round; 91 | 92 | for (var i = 0; i < count; i++) { 93 | canvas.drawCircle( 94 | Offset(radius + (radius * 2 + spacing) * i, size.height / 2), 95 | radius, 96 | buttonPointPainter); 97 | } 98 | canvas.drawCircle( 99 | Offset(radius + offset, size.height / 2), radius, slidePointPainter); 100 | } 101 | 102 | @override 103 | bool shouldRepaint(CustomPainter oldDelegate) { 104 | return true; 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/utils/dash_path.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:meta/meta.dart'; 4 | 5 | /// Creates a new path that is drawn from the segments of `source`. 6 | /// 7 | /// Dash intervals are controled by the `dashArray` - see [CircularIntervalList] 8 | /// for examples. 9 | /// 10 | /// `dashOffset` specifies an initial starting point for the dashing. 11 | /// 12 | /// Passing in a null `source` will result in a null result. Passing a `source` 13 | /// that is an empty path will return an empty path. 14 | Path dashPath( 15 | Path source, { 16 | @required CircularIntervalList dashArray, 17 | DashOffset dashOffset, 18 | }) { 19 | assert(dashArray != null); 20 | if (source == null) { 21 | return null; 22 | } 23 | 24 | dashOffset = dashOffset ?? const DashOffset.absolute(0.0); 25 | // TODO: Is there some way to determine how much of a path would be visible today? 26 | 27 | final Path dest = Path(); 28 | for (final PathMetric metric in source.computeMetrics()) { 29 | double distance = dashOffset._calculate(metric.length); 30 | bool draw = true; 31 | while (distance < metric.length) { 32 | final double len = dashArray.next; 33 | if (draw) { 34 | dest.addPath(metric.extractPath(distance, distance + len), Offset.zero); 35 | } 36 | distance += len; 37 | draw = !draw; 38 | } 39 | } 40 | 41 | return dest; 42 | } 43 | 44 | enum _DashOffsetType { Absolute, Percentage } 45 | 46 | /// Specifies the starting position of a dash array on a path, either as a 47 | /// percentage or absolute value. 48 | /// 49 | /// The internal value will be guaranteed to not be null. 50 | class DashOffset { 51 | /// Create a DashOffset that will be measured as a percentage of the length 52 | /// of the segment being dashed. 53 | /// 54 | /// `percentage` will be clamped between 0.0 and 1.0; null will be converted 55 | /// to 0.0. 56 | DashOffset.percentage(double percentage) 57 | : _rawVal = percentage.clamp(0.0, 1.0) ?? 0.0, 58 | _dashOffsetType = _DashOffsetType.Percentage; 59 | 60 | /// Create a DashOffset that will be measured in terms of absolute pixels 61 | /// along the length of a [Path] segment. 62 | /// 63 | /// `start` will be coerced to 0.0 if null. 64 | const DashOffset.absolute(double start) 65 | : _rawVal = start ?? 0.0, 66 | _dashOffsetType = _DashOffsetType.Absolute; 67 | 68 | final double _rawVal; 69 | final _DashOffsetType _dashOffsetType; 70 | 71 | double _calculate(double length) { 72 | return _dashOffsetType == _DashOffsetType.Absolute 73 | ? _rawVal 74 | : length * _rawVal; 75 | } 76 | } 77 | 78 | /// A circular array of dash offsets and lengths. 79 | /// 80 | /// For example, the array `[5, 10]` would result in dashes 5 pixels long 81 | /// followed by blank spaces 10 pixels long. The array `[5, 10, 5]` would 82 | /// result in a 5 pixel dash, a 10 pixel gap, a 5 pixel dash, a 5 pixel gap, 83 | /// a 10 pixel dash, etc. 84 | /// 85 | /// Note that this does not quite conform to an [Iterable], because it does 86 | /// not have a moveNext. 87 | class CircularIntervalList { 88 | CircularIntervalList(this._vals); 89 | 90 | final List _vals; 91 | int _idx = 0; 92 | 93 | T get next { 94 | if (_idx >= _vals.length) { 95 | _idx = 0; 96 | } 97 | return _vals[_idx++]; 98 | } 99 | } -------------------------------------------------------------------------------- /lib/widget/float_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/gestures.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class FloatWidget extends StatefulWidget { 5 | Widget child; 6 | FloatButton button; 7 | bool isHasTitlebar; 8 | 9 | FloatWidget( 10 | {@required this.child, 11 | @required this.button, 12 | this.isHasTitlebar = false}); 13 | 14 | @override 15 | State createState() { 16 | return _FloatWidgetState(); 17 | } 18 | } 19 | 20 | class _FloatWidgetState extends State { 21 | final Map gestures = 22 | {}; 23 | double translateY = 300; 24 | double maxSlideHeight = 0; 25 | 26 | @override 27 | void initState() { 28 | super.initState(); 29 | gestures[VerticalDragGestureRecognizer] = 30 | GestureRecognizerFactoryWithHandlers( 31 | () => VerticalDragGestureRecognizer(debugOwner: this), 32 | (VerticalDragGestureRecognizer instance) { 33 | instance 34 | ..onDown = onVerticalDragDown 35 | ..onUpdate = onVerticalDragUpdate 36 | ..onEnd = onVerticalDragEnd; 37 | }, 38 | ); 39 | } 40 | 41 | @override 42 | Widget build(BuildContext context) { 43 | // translateY=MediaQuery.of(context).size.height/3; 44 | return Container( 45 | width: MediaQuery.of(context).size.width, 46 | height: MediaQuery.of(context).size.height, 47 | child: Stack( 48 | children: [ 49 | widget.child, 50 | Positioned( 51 | child: RawGestureDetector( 52 | gestures: gestures, 53 | child: widget.button, 54 | ), 55 | right: 0, 56 | top: translateY, 57 | ) 58 | ], 59 | ), 60 | ); 61 | } 62 | 63 | void onVerticalDragDown(DragDownDetails details) {} 64 | 65 | void onVerticalDragUpdate(DragUpdateDetails details) { 66 | maxSlideHeight = widget.isHasTitlebar 67 | ? MediaQuery.of(context).size.height - 68 | MediaQuery.of(context).padding.top - 69 | 56 - 70 | widget.button.size.height 71 | : MediaQuery.of(context).size.height - 72 | widget.button.size.height; 73 | var dy = details.delta.dy; 74 | translateY = translateY + dy; 75 | if (translateY < 0) { 76 | translateY = 0; 77 | } else if (translateY > maxSlideHeight) { 78 | print(MediaQuery.of(context).padding.top); 79 | translateY = maxSlideHeight; 80 | } 81 | 82 | setState(() {}); 83 | } 84 | 85 | void onVerticalDragEnd(DragEndDetails details) {} 86 | } 87 | 88 | class FloatButton extends StatefulWidget { 89 | Widget button; 90 | GlobalKey key; 91 | Size size; 92 | 93 | FloatButton({@required this.key, @required this.button, @required this.size}) 94 | : super(key: key); 95 | 96 | @override 97 | State createState() { 98 | return FloatButtonState(); 99 | } 100 | } 101 | 102 | class FloatButtonState extends State { 103 | @override 104 | Widget build(BuildContext context) { 105 | return SizedBox( 106 | width: widget.size.width, 107 | height: widget.size.height, 108 | child: widget.button, 109 | ); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/generated/i18n.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | // ignore_for_file: non_constant_identifier_names 7 | // ignore_for_file: camel_case_types 8 | // ignore_for_file: prefer_single_quotes 9 | 10 | // This file is automatically generated. DO NOT EDIT, all your changes would be lost. 11 | class S implements WidgetsLocalizations { 12 | const S(); 13 | 14 | static const GeneratedLocalizationsDelegate delegate = 15 | GeneratedLocalizationsDelegate(); 16 | 17 | static S of(BuildContext context) => Localizations.of(context, S); 18 | 19 | @override 20 | TextDirection get textDirection => TextDirection.ltr; 21 | 22 | } 23 | 24 | class $en extends S { 25 | const $en(); 26 | } 27 | 28 | class GeneratedLocalizationsDelegate extends LocalizationsDelegate { 29 | const GeneratedLocalizationsDelegate(); 30 | 31 | List get supportedLocales { 32 | return const [ 33 | Locale("en", ""), 34 | ]; 35 | } 36 | 37 | LocaleListResolutionCallback listResolution({Locale fallback, bool withCountry = true}) { 38 | return (List locales, Iterable supported) { 39 | if (locales == null || locales.isEmpty) { 40 | return fallback ?? supported.first; 41 | } else { 42 | return _resolve(locales.first, fallback, supported, withCountry); 43 | } 44 | }; 45 | } 46 | 47 | LocaleResolutionCallback resolution({Locale fallback, bool withCountry = true}) { 48 | return (Locale locale, Iterable supported) { 49 | return _resolve(locale, fallback, supported, withCountry); 50 | }; 51 | } 52 | 53 | @override 54 | Future load(Locale locale) { 55 | final String lang = getLang(locale); 56 | if (lang != null) { 57 | switch (lang) { 58 | case "en": 59 | return SynchronousFuture(const $en()); 60 | default: 61 | // NO-OP. 62 | } 63 | } 64 | return SynchronousFuture(const S()); 65 | } 66 | 67 | @override 68 | bool isSupported(Locale locale) => _isSupported(locale, true); 69 | 70 | @override 71 | bool shouldReload(GeneratedLocalizationsDelegate old) => false; 72 | 73 | /// 74 | /// Internal method to resolve a locale from a list of locales. 75 | /// 76 | Locale _resolve(Locale locale, Locale fallback, Iterable supported, bool withCountry) { 77 | if (locale == null || !_isSupported(locale, withCountry)) { 78 | return fallback ?? supported.first; 79 | } 80 | 81 | final Locale languageLocale = Locale(locale.languageCode, ""); 82 | if (supported.contains(locale)) { 83 | return locale; 84 | } else if (supported.contains(languageLocale)) { 85 | return languageLocale; 86 | } else { 87 | final Locale fallbackLocale = fallback ?? supported.first; 88 | return fallbackLocale; 89 | } 90 | } 91 | 92 | /// 93 | /// Returns true if the specified locale is supported, false otherwise. 94 | /// 95 | bool _isSupported(Locale locale, bool withCountry) { 96 | if (locale != null) { 97 | for (Locale supportedLocale in supportedLocales) { 98 | // Language must always match both locales. 99 | if (supportedLocale.languageCode != locale.languageCode) { 100 | continue; 101 | } 102 | 103 | // If country code matches, return this locale. 104 | if (supportedLocale.countryCode == locale.countryCode) { 105 | return true; 106 | } 107 | 108 | // If no country requirement is requested, check if this locale has no country. 109 | if (true != withCountry && (supportedLocale.countryCode == null || supportedLocale.countryCode.isEmpty)) { 110 | return true; 111 | } 112 | } 113 | } 114 | return false; 115 | } 116 | } 117 | 118 | String getLang(Locale l) => l == null 119 | ? null 120 | : l.countryCode != null && l.countryCode.isEmpty 121 | ? l.languageCode 122 | : l.toString(); 123 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "2.1.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "1.0.4" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "1.1.2" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.14.11" 32 | cupertino_icons: 33 | dependency: "direct main" 34 | description: 35 | name: cupertino_icons 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "0.1.2" 39 | flutter: 40 | dependency: "direct main" 41 | description: flutter 42 | source: sdk 43 | version: "0.0.0" 44 | flutter_test: 45 | dependency: "direct dev" 46 | description: flutter 47 | source: sdk 48 | version: "0.0.0" 49 | fluttertoast: 50 | dependency: "direct main" 51 | description: 52 | name: fluttertoast 53 | url: "https://pub.flutter-io.cn" 54 | source: hosted 55 | version: "3.0.3" 56 | matcher: 57 | dependency: transitive 58 | description: 59 | name: matcher 60 | url: "https://pub.flutter-io.cn" 61 | source: hosted 62 | version: "0.12.5" 63 | meta: 64 | dependency: transitive 65 | description: 66 | name: meta 67 | url: "https://pub.flutter-io.cn" 68 | source: hosted 69 | version: "1.1.6" 70 | path: 71 | dependency: transitive 72 | description: 73 | name: path 74 | url: "https://pub.flutter-io.cn" 75 | source: hosted 76 | version: "1.6.2" 77 | pedantic: 78 | dependency: transitive 79 | description: 80 | name: pedantic 81 | url: "https://pub.flutter-io.cn" 82 | source: hosted 83 | version: "1.5.0" 84 | quiver: 85 | dependency: transitive 86 | description: 87 | name: quiver 88 | url: "https://pub.flutter-io.cn" 89 | source: hosted 90 | version: "2.0.2" 91 | sky_engine: 92 | dependency: transitive 93 | description: flutter 94 | source: sdk 95 | version: "0.0.99" 96 | source_span: 97 | dependency: transitive 98 | description: 99 | name: source_span 100 | url: "https://pub.flutter-io.cn" 101 | source: hosted 102 | version: "1.5.5" 103 | stack_trace: 104 | dependency: transitive 105 | description: 106 | name: stack_trace 107 | url: "https://pub.flutter-io.cn" 108 | source: hosted 109 | version: "1.9.3" 110 | stream_channel: 111 | dependency: transitive 112 | description: 113 | name: stream_channel 114 | url: "https://pub.flutter-io.cn" 115 | source: hosted 116 | version: "2.0.0" 117 | string_scanner: 118 | dependency: transitive 119 | description: 120 | name: string_scanner 121 | url: "https://pub.flutter-io.cn" 122 | source: hosted 123 | version: "1.0.4" 124 | term_glyph: 125 | dependency: transitive 126 | description: 127 | name: term_glyph 128 | url: "https://pub.flutter-io.cn" 129 | source: hosted 130 | version: "1.1.0" 131 | test_api: 132 | dependency: transitive 133 | description: 134 | name: test_api 135 | url: "https://pub.flutter-io.cn" 136 | source: hosted 137 | version: "0.2.4" 138 | typed_data: 139 | dependency: transitive 140 | description: 141 | name: typed_data 142 | url: "https://pub.flutter-io.cn" 143 | source: hosted 144 | version: "1.1.6" 145 | vector_math: 146 | dependency: transitive 147 | description: 148 | name: vector_math 149 | url: "https://pub.flutter-io.cn" 150 | source: hosted 151 | version: "2.0.8" 152 | sdks: 153 | dart: ">=2.2.0 <3.0.0" 154 | -------------------------------------------------------------------------------- /lib/widget/slide_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/gestures.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class SlideButton extends StatefulWidget { 5 | Widget child; 6 | List buttons; 7 | GlobalKey key; 8 | double singleButtonWidth; 9 | 10 | VoidCallback onSlideStarted; 11 | 12 | VoidCallback onSlideCompleted; 13 | 14 | VoidCallback onSlideCanceled; 15 | 16 | SlideButton( 17 | {this.key, 18 | @required this.child, 19 | @required this.singleButtonWidth, 20 | @required this.buttons, 21 | this.onSlideStarted, 22 | this.onSlideCompleted, 23 | this.onSlideCanceled}) 24 | : super(key: key); 25 | 26 | @override 27 | State createState() { 28 | return SlideButtonState(); 29 | } 30 | } 31 | 32 | class SlideButtonState extends State 33 | with TickerProviderStateMixin { 34 | double translateX = 0; 35 | double maxDragDistance; 36 | final Map gestures = 37 | {}; 38 | 39 | AnimationController animationController; 40 | 41 | @override 42 | void initState() { 43 | super.initState(); 44 | maxDragDistance = widget.singleButtonWidth * widget.buttons.length; 45 | gestures[HorizontalDragGestureRecognizer] = 46 | GestureRecognizerFactoryWithHandlers( 47 | () => HorizontalDragGestureRecognizer(debugOwner: this), 48 | (HorizontalDragGestureRecognizer instance) { 49 | instance 50 | ..onDown = onHorizontalDragDown 51 | ..onUpdate = onHorizontalDragUpdate 52 | ..onEnd = onHorizontalDragEnd; 53 | }, 54 | ); 55 | animationController = AnimationController( 56 | lowerBound: -maxDragDistance, 57 | upperBound: 0, 58 | vsync: this, 59 | duration: Duration(milliseconds: 300)) 60 | ..addListener(() { 61 | translateX = animationController.value; 62 | setState(() {}); 63 | }); 64 | } 65 | 66 | @override 67 | Widget build(BuildContext context) { 68 | return WillPopScope(child: Stack( 69 | children: [ 70 | Positioned.fill( 71 | child: Row( 72 | mainAxisAlignment: MainAxisAlignment.end, 73 | children: widget.buttons, 74 | )), 75 | RawGestureDetector( 76 | gestures: gestures, 77 | child: Transform.translate( 78 | offset: Offset(translateX, 0), 79 | child: Row( 80 | children: [ 81 | Expanded( 82 | flex: 1, 83 | child: widget.child, 84 | ) 85 | ], 86 | ), 87 | ), 88 | ) 89 | ], 90 | ), onWillPop: ()async{ 91 | if (translateX != 0){ 92 | close(); 93 | return false; 94 | } 95 | return true; 96 | }); 97 | } 98 | 99 | void onHorizontalDragDown(DragDownDetails details) { 100 | if (widget.onSlideStarted != null) widget.onSlideStarted.call(); 101 | } 102 | 103 | void onHorizontalDragUpdate(DragUpdateDetails details) { 104 | translateX = (translateX + details.delta.dx).clamp(-maxDragDistance, 0.0); 105 | setState(() {}); 106 | } 107 | 108 | void onHorizontalDragEnd(DragEndDetails details) { 109 | animationController.value = translateX; 110 | if (details.velocity.pixelsPerSecond.dx > 200) { 111 | close(); 112 | } else if (details.velocity.pixelsPerSecond.dx < -200) { 113 | open(); 114 | } else { 115 | if (translateX.abs() > maxDragDistance / 2) { 116 | open(); 117 | } else { 118 | close(); 119 | } 120 | } 121 | } 122 | 123 | void open() { 124 | if (translateX != -maxDragDistance) 125 | animationController.animateTo(-maxDragDistance).then((_) { 126 | if (widget.onSlideCompleted != null) widget.onSlideCompleted.call(); 127 | }); 128 | } 129 | 130 | void close() { 131 | if (translateX != 0) 132 | animationController.animateTo(0).then((_) { 133 | if (widget.onSlideCanceled != null) widget.onSlideCanceled.call(); 134 | }); 135 | } 136 | 137 | @override 138 | void dispose() { 139 | animationController.dispose(); 140 | super.dispose(); 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /lib/page/popup_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_ui/widget/flutter_ui.dart'; 3 | 4 | class PopupPage extends StatefulWidget { 5 | @override 6 | State createState() { 7 | return _PopupPageState(); 8 | } 9 | } 10 | 11 | class _PopupPageState extends State { 12 | GlobalKey popLeftKey; 13 | GlobalKey popTopKey; 14 | GlobalKey popRightKey; 15 | GlobalKey popBottomKey; 16 | GlobalKey popCustomKey; 17 | 18 | @override 19 | void initState() { 20 | super.initState(); 21 | popLeftKey = GlobalKey(); 22 | popTopKey = GlobalKey(); 23 | popRightKey = GlobalKey(); 24 | popBottomKey = GlobalKey(); 25 | popCustomKey = GlobalKey(); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | return Scaffold( 31 | appBar: AppBar( 32 | title: Text("PopupWindow"), 33 | ), 34 | body: ListView( 35 | children: [ 36 | Padding( 37 | padding: EdgeInsets.all(25), 38 | child: Center( 39 | child: SizedBox( 40 | key: popLeftKey, 41 | width: 100, 42 | height: 60, 43 | child: FlatButton( 44 | onPressed: () { 45 | PopupWindow.showPopWindow(context, "left", popLeftKey, 46 | PopDirection.left, null, 5); 47 | }, 48 | color: Colors.green, 49 | child: Text("left",style: TextStyle(color: Colors.white),)), 50 | ), 51 | ), 52 | ), 53 | Padding( 54 | padding: EdgeInsets.all(25), 55 | child: Center( 56 | child: SizedBox( 57 | key: popTopKey, 58 | width: 100, 59 | height: 60, 60 | child: FlatButton( 61 | onPressed: () { 62 | PopupWindow.showPopWindow(context, "top", popTopKey, 63 | PopDirection.top, null, 5); 64 | }, 65 | color: Colors.red, 66 | child: Text("top",style: TextStyle(color: Colors.white),)), 67 | ), 68 | ), 69 | ), 70 | Padding( 71 | padding: EdgeInsets.all(25), 72 | child: Center( 73 | child: SizedBox( 74 | key: popRightKey, 75 | width: 100, 76 | height: 60, 77 | child: FlatButton( 78 | onPressed: () { 79 | PopupWindow.showPopWindow(context, "right", popRightKey, 80 | PopDirection.right, null, 5); 81 | }, 82 | color: Colors.amber, 83 | child: Text("right",style: TextStyle(color: Colors.white),)), 84 | ), 85 | ), 86 | ), 87 | Padding( 88 | padding: EdgeInsets.all(25), 89 | child: Center( 90 | child: SizedBox( 91 | key: popBottomKey, 92 | width: 100, 93 | height: 60, 94 | child: FlatButton( 95 | onPressed: () { 96 | PopupWindow.showPopWindow(context, "bottom", 97 | popBottomKey, PopDirection.bottom, null, 5); 98 | }, 99 | color: Colors.blue, 100 | child: Text("bottom",style: TextStyle(color: Colors.white),)), 101 | ), 102 | ), 103 | ), 104 | Padding( 105 | padding: EdgeInsets.all(25), 106 | child: Center( 107 | child: SizedBox( 108 | key: popCustomKey, 109 | width: 100, 110 | height: 60, 111 | child: FlatButton( 112 | onPressed: () { 113 | PopupWindow.showPopWindow(context, "", popCustomKey, 114 | PopDirection.top, buildWidget(), 5); 115 | }, 116 | color: Colors.amberAccent, 117 | child: Text("Custom",style: TextStyle(color: Colors.white),)), 118 | ), 119 | ), 120 | ) 121 | ], 122 | ), 123 | ); 124 | } 125 | 126 | Widget buildWidget() { 127 | return Container( 128 | padding: EdgeInsets.all(10), 129 | decoration: BoxDecoration( 130 | color: Colors.red, 131 | borderRadius: BorderRadius.all(Radius.circular(6))), 132 | child: Column( 133 | children: [Text("CustomCustomCustomCustomCustom\nCustom"), Text("Custom"), Text("Custom")], 134 | ), 135 | ); 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /lib/widget/popup_window.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | ///类似于Android中的PopupWindow 4 | class PopupWindow extends StatefulWidget { 5 | static void showPopWindow(context, String msg, GlobalKey popKey, 6 | [PopDirection popDirection = PopDirection.bottom, 7 | Widget popWidget, 8 | double offset = 0]) { 9 | Navigator.push( 10 | context, 11 | PopRoute( 12 | child: PopupWindow( 13 | msg: msg, 14 | popKey: popKey, 15 | popDirection: popDirection, 16 | popWidget: popWidget, 17 | offset: offset, 18 | ))); 19 | } 20 | 21 | String msg; 22 | GlobalKey popKey; 23 | PopDirection popDirection; 24 | Widget popWidget; //自定义widget 25 | double offset; //popupWindow偏移量 26 | 27 | PopupWindow( 28 | {this.popWidget, 29 | this.msg, 30 | this.popKey, 31 | this.popDirection = PopDirection.bottom, 32 | this.offset}); 33 | 34 | @override 35 | State createState() { 36 | return _PopupWindowState(); 37 | } 38 | } 39 | 40 | class _PopupWindowState extends State { 41 | GlobalKey buttonKey; 42 | double left = -100; 43 | double top = -100; 44 | 45 | @override 46 | void initState() { 47 | super.initState(); 48 | buttonKey = GlobalKey(); 49 | WidgetsBinding.instance.addPostFrameCallback((_) { 50 | RenderBox renderBox = widget.popKey.currentContext.findRenderObject(); 51 | Offset localToGlobal = 52 | renderBox.localToGlobal(Offset.zero); //targetWidget的坐标位置 53 | Size size = renderBox.size; //targetWidget的size 54 | 55 | RenderBox buttonBox = buttonKey.currentContext.findRenderObject(); 56 | var buttonSize = buttonBox.size; //button的size 57 | switch (widget.popDirection) { 58 | case PopDirection.left: 59 | left = localToGlobal.dx - buttonSize.width - widget.offset; 60 | top = localToGlobal.dy + size.height / 2 - buttonSize.height / 2; 61 | break; 62 | case PopDirection.top: 63 | left = localToGlobal.dx + size.width / 2 - buttonSize.width / 2; 64 | top = localToGlobal.dy - buttonSize.height - widget.offset; 65 | fixPosition(buttonSize); 66 | break; 67 | case PopDirection.right: 68 | left = localToGlobal.dx + size.width + widget.offset; 69 | top = localToGlobal.dy + size.height / 2 - buttonSize.height / 2; 70 | break; 71 | case PopDirection.bottom: 72 | left = localToGlobal.dx + size.width / 2 - buttonSize.width / 2; 73 | top = localToGlobal.dy + size.height + widget.offset; 74 | fixPosition(buttonSize); 75 | break; 76 | } 77 | setState(() {}); 78 | }); 79 | } 80 | 81 | void fixPosition(Size buttonSize) { 82 | if (left < 0) { 83 | left = 0; 84 | } 85 | if (left + buttonSize.width >= MediaQuery.of(context).size.width) { 86 | left = MediaQuery.of(context).size.width - buttonSize.width; 87 | } 88 | } 89 | 90 | @override 91 | Widget build(BuildContext context) { 92 | return Material( 93 | color: Colors.transparent, 94 | child: GestureDetector( 95 | child: Stack( 96 | children: [ 97 | Container( 98 | width: MediaQuery.of(context).size.width, 99 | height: MediaQuery.of(context).size.height, 100 | color: Colors.transparent, 101 | ), 102 | Positioned( 103 | child: GestureDetector( 104 | child: widget.popWidget == null 105 | ? _buildWidget(widget.msg) 106 | : _buildCustomWidget(widget.popWidget), 107 | ), 108 | left: left, 109 | top: top, 110 | ) 111 | ], 112 | ), 113 | onTap: () { 114 | Navigator.pop(context); 115 | }, 116 | ), 117 | ); 118 | } 119 | 120 | Widget _buildWidget(String text) => Container( 121 | key: buttonKey, 122 | padding: EdgeInsets.all(10), 123 | decoration: BoxDecoration( 124 | color: Colors.grey[200], 125 | borderRadius: BorderRadius.all(Radius.circular(6))), 126 | child: Text(text), 127 | ); 128 | 129 | Widget _buildCustomWidget(Widget child) => Container( 130 | key: buttonKey, 131 | child: child, 132 | ); 133 | } 134 | 135 | class PopRoute extends PopupRoute { 136 | final Duration _duration = Duration(milliseconds: 200); 137 | Widget child; 138 | 139 | PopRoute({@required this.child}); 140 | 141 | @override 142 | Color get barrierColor => null; 143 | 144 | @override 145 | bool get barrierDismissible => true; 146 | 147 | @override 148 | String get barrierLabel => null; 149 | 150 | @override 151 | Widget buildPage(BuildContext context, Animation animation, 152 | Animation secondaryAnimation) { 153 | return child; 154 | } 155 | 156 | @override 157 | Duration get transitionDuration => _duration; 158 | } 159 | 160 | //popwindow的方向 161 | enum PopDirection { left, top, right, bottom } 162 | -------------------------------------------------------------------------------- /lib/widget/arc_progress_bar.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'dart:math'; 5 | import 'dart:ui' as ui; 6 | 7 | num degToRad(num deg) => deg * (pi / 180.0); 8 | 9 | num radToDeg(num rad) => rad * (180.0 / pi); 10 | 11 | class ArcProgressBar extends StatefulWidget { 12 | ProgressController controller; 13 | double radius; 14 | double maxProgress; 15 | double initProgress; 16 | double value = 0.0; 17 | 18 | Color ringColor; 19 | Color progressColor; 20 | double strokeWidth; 21 | 22 | ArcProgressBar( 23 | {@required this.radius, 24 | @required this.maxProgress, 25 | double initProgress, 26 | @required this.controller, 27 | this.ringColor = Colors.blue, 28 | this.progressColor = Colors.red, 29 | this.strokeWidth = 10}) 30 | : initProgress = initProgress == null ? 0 : initProgress, 31 | assert(initProgress <= maxProgress); 32 | 33 | @override 34 | State createState() { 35 | return _ArcProgressBarState(); 36 | } 37 | } 38 | 39 | class _ArcProgressBarState extends State 40 | with SingleTickerProviderStateMixin { 41 | double progressAngel; 42 | 43 | AnimationController _animationController; 44 | 45 | @override 46 | void initState() { 47 | super.initState(); 48 | _animationController = AnimationController( 49 | lowerBound: 0, 50 | upperBound: widget.maxProgress, 51 | duration: Duration(milliseconds: 800), 52 | vsync: this) 53 | ..addListener(() { 54 | var value = _animationController.value; 55 | setState(() { 56 | progressAngel = (270 * value) / widget.maxProgress; 57 | }); 58 | }); 59 | 60 | widget.controller.listener.addListener(() { 61 | double value = widget.controller.listener.value; 62 | value = value >= widget.maxProgress ? widget.maxProgress : value; 63 | _animationController.value = widget.value; 64 | _animationController.animateTo(value); 65 | widget.value = value; 66 | }); 67 | widget.controller.changeProgress(widget.initProgress); 68 | } 69 | 70 | @override 71 | Widget build(BuildContext context) { 72 | return Container( 73 | child: CustomPaint( 74 | size: Size(widget.radius * 2, widget.radius * 2.5), 75 | painter: ArcPainter( 76 | strokeWidth: widget.strokeWidth, 77 | ringColor: widget.ringColor, 78 | progressColor: widget.progressColor, 79 | progressAngel: progressAngel, 80 | value: widget.value), 81 | ), 82 | ); 83 | } 84 | 85 | @override 86 | void dispose() { 87 | super.dispose(); 88 | _animationController.dispose(); 89 | } 90 | } 91 | 92 | class ArcPainter extends CustomPainter { 93 | double degreeAngel = 270; 94 | double progressAngel = 0; 95 | double value; 96 | Color ringColor; 97 | Color progressColor; 98 | double strokeWidth; 99 | 100 | ArcPainter( 101 | {progressAngel, 102 | value, 103 | this.ringColor = Colors.blue, 104 | this.progressColor = Colors.red, 105 | this.strokeWidth = 10}) 106 | : progressAngel = progressAngel == null ? 0 : progressAngel, 107 | value = value == null ? 0 : value; 108 | 109 | @override 110 | void paint(Canvas canvas, Size size) { 111 | canvas.save(); 112 | translateAndRotateCanvas(canvas, size, 135); 113 | //绘制底部圆环 114 | var bigPainter = Paint() 115 | ..isAntiAlias = true 116 | ..strokeWidth = strokeWidth 117 | ..color = ringColor 118 | ..style = PaintingStyle.stroke 119 | ..strokeCap = StrokeCap.round; 120 | var progressPainter = Paint() 121 | ..isAntiAlias = true 122 | ..strokeWidth = strokeWidth 123 | ..color = progressColor 124 | ..style = PaintingStyle.stroke 125 | ..strokeCap = StrokeCap.round; 126 | canvas.drawArc( 127 | Rect.fromCircle( 128 | center: Offset(size.width / 2, size.height / 2), 129 | radius: size.width / 2 - strokeWidth / 2), 130 | 0, 131 | degToRad(degreeAngel), 132 | false, 133 | bigPainter); 134 | 135 | canvas.drawArc( 136 | Rect.fromCircle( 137 | center: Offset(size.width / 2, size.height / 2), 138 | radius: size.width / 2 - strokeWidth / 2), 139 | 0, 140 | degToRad(progressAngel), 141 | false, 142 | progressPainter); 143 | canvas.restore(); 144 | 145 | //绘制文字 146 | ParagraphBuilder pb = 147 | ui.ParagraphBuilder(ui.ParagraphStyle(textAlign: TextAlign.center)) 148 | ..pushStyle(ui.TextStyle(color: Color(0xff333333), fontSize: 20)) 149 | ..addText(value.toInt().toString()); 150 | ParagraphConstraints pc = ParagraphConstraints(width: size.width); 151 | Paragraph paragraph = pb.build()..layout(pc); 152 | print(paragraph.minIntrinsicWidth); 153 | canvas.drawParagraph( 154 | paragraph, Offset(0, size.height / 2 - paragraph.height / 2)); 155 | } 156 | 157 | @override 158 | bool shouldRepaint(CustomPainter oldDelegate) { 159 | return true; 160 | } 161 | 162 | void translateAndRotateCanvas(Canvas canvas, Size size, double degAngel) { 163 | // 计算画布中心轨迹圆半径 164 | double r = sqrt(pow(size.width, 2) + pow(size.height, 2)); 165 | // 计算画布中心点初始弧度 166 | double startAngle = atan(size.height / size.width); 167 | // 计算画布初始中心点坐标 168 | Point p0 = Point(r * cos(startAngle), r * sin(startAngle)); 169 | // 需要旋转的弧度 170 | double xAngle = degToRad(degAngel); 171 | // 计算旋转后的画布中心点坐标 172 | Point px = 173 | Point(r * cos(xAngle + startAngle), r * sin(xAngle + startAngle)); 174 | // 先平移画布 175 | canvas.translate((p0.x - px.x) / 2, (p0.y - px.y) / 2); 176 | // 后旋转 177 | canvas.rotate(xAngle); 178 | } 179 | } 180 | 181 | class ProgressController { 182 | ValueNotifier listener = ValueNotifier(0); 183 | 184 | get value => listener.value; 185 | 186 | void changeProgress(double progress) { 187 | listener.value = progress; 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /lib/widget/verification_code_widget.dart: -------------------------------------------------------------------------------- 1 | import 'dart:ui' as ui; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter/services.dart'; 5 | 6 | import 'package:flutter_ui/utils/dash_path.dart' as dashPath; 7 | 8 | import 'dart:math'; 9 | 10 | //https://github.com/yumi0629/FlutterUI/tree/master/lib/verificationcode 11 | 12 | class VerificationCodeInput extends StatefulWidget { 13 | final double letterSpace; 14 | final double textSize; 15 | final int codeLength; 16 | final InputBorder inputBorder; 17 | 18 | VerificationCodeInput({ 19 | Key key, 20 | this.letterSpace = 20.0, 21 | this.textSize = 20.0, 22 | this.codeLength = 4, 23 | this.inputBorder, 24 | }) : super(key: key); 25 | 26 | @override 27 | State createState() => VerificationCodeInputState(); 28 | } 29 | 30 | class VerificationCodeInputState extends State { 31 | double textTrueWidth; 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return TextField( 36 | //限制输入的 最大长度 TextField右下角没有输入数量的统计字符串 37 | inputFormatters: [LengthLimitingTextInputFormatter(widget.codeLength)], 38 | keyboardType: TextInputType.number, 39 | style: TextStyle( 40 | fontSize: widget.textSize, 41 | color: Colors.black87, 42 | letterSpacing: widget.letterSpace), 43 | decoration: InputDecoration( 44 | enabledBorder: widget.inputBorder, 45 | focusedBorder: widget.inputBorder), 46 | ); 47 | } 48 | } 49 | 50 | abstract class InputBorder extends UnderlineInputBorder { 51 | double textSize; 52 | double letterSpace; 53 | int textLength; 54 | 55 | double textTrueWidth; 56 | final double startOffset; 57 | 58 | void calcTrueTextSize() { 59 | // 测量单个数字实际长度 60 | var paragraph = ui.ParagraphBuilder(ui.ParagraphStyle(fontSize: textSize)) 61 | ..addText("0"); 62 | var p = paragraph.build() 63 | ..layout(ui.ParagraphConstraints(width: double.infinity)); 64 | textTrueWidth = p.minIntrinsicWidth; 65 | } 66 | 67 | InputBorder({ 68 | this.textSize = 0.0, 69 | this.letterSpace = 0.0, 70 | this.textLength, 71 | BorderSide borderSide = const BorderSide(), 72 | }) : startOffset = letterSpace * 0.5, 73 | super(borderSide: borderSide) { 74 | calcTrueTextSize(); 75 | } 76 | } 77 | 78 | class CustomRectInputBorder extends InputBorder { 79 | CustomRectInputBorder({ 80 | double textSize = 0.0, 81 | double letterSpace, 82 | int textLength, 83 | BorderSide borderSide = const BorderSide(), 84 | }) : super( 85 | textSize: textSize, 86 | letterSpace: letterSpace, 87 | textLength: textLength, 88 | borderSide: borderSide); 89 | 90 | double get offsetX => textTrueWidth * 0.3; 91 | 92 | double get offsetY => textTrueWidth * 0.3; 93 | 94 | @override 95 | void paint( 96 | Canvas canvas, 97 | Rect rect, { 98 | double gapStart, 99 | double gapExtent = 0.0, 100 | double gapPercentage = 0.0, 101 | TextDirection textDirection, 102 | }) { 103 | double curStartX = rect.left + startOffset - offsetX; 104 | for (int i = 0; i < textLength; i++) { 105 | Rect r = Rect.fromLTWH(curStartX, rect.top + offsetY, 106 | textTrueWidth + offsetX * 2, rect.height - offsetY * 2); 107 | canvas.drawRect(r, borderSide.toPaint()); 108 | curStartX += (textTrueWidth + letterSpace); 109 | } 110 | } 111 | } 112 | 113 | class CustomHeartInputBorder extends InputBorder { 114 | 115 | num degToRad(num deg) => deg * (pi / 180.0); 116 | 117 | num radToDeg(num rad) => rad * (180.0 / pi); 118 | 119 | CustomHeartInputBorder({ 120 | double textSize = 0.0, 121 | double letterSpace, 122 | int textLength, 123 | BorderSide borderSide = const BorderSide(), 124 | }) : super( 125 | textSize: textSize, 126 | letterSpace: letterSpace, 127 | textLength: textLength, 128 | borderSide: borderSide); 129 | 130 | double get offsetX => textTrueWidth * 0.3; 131 | 132 | // angleOffset should be range 0 to 90. 133 | double get angleOffset => 40.0; 134 | 135 | @override 136 | void paint( 137 | Canvas canvas, 138 | Rect rect, { 139 | double gapStart, 140 | double gapExtent = 0.0, 141 | double gapPercentage = 0.0, 142 | TextDirection textDirection, 143 | }) { 144 | double width = rect.height - offsetX; 145 | double radius = width * 0.25; 146 | // 1:editable.dart _kCaretGap 147 | double curStartX = startOffset - radius - offsetX - 1; 148 | if (curStartX < 0) { 149 | throw ArgumentError( 150 | 'No enough space to paint border! LetterSpace is too small.'); 151 | } 152 | double top = rect.center.dy - radius * 2; 153 | double bottom = rect.center.dy + radius * 2; 154 | Path path = Path(); 155 | for (int i = 0; i < textLength; i++) { 156 | path.moveTo(curStartX + radius * 2, top + radius); 157 | path.arcTo( 158 | Rect.fromCircle( 159 | center: Offset(curStartX + radius, top + radius), radius: radius), 160 | degToRad(180.0 - angleOffset), 161 | degToRad(180.0 + angleOffset), 162 | true); 163 | double sinLength = radius * sin(degToRad(angleOffset)); 164 | double cosLength = radius * cos(degToRad(angleOffset)); 165 | path.moveTo(curStartX + radius - cosLength, top + radius + sinLength); 166 | path.lineTo(curStartX + radius * 2, bottom); 167 | path.lineTo(curStartX + radius * 3 + cosLength, top + radius + sinLength); 168 | path.arcTo( 169 | Rect.fromCircle( 170 | center: Offset(curStartX + radius * 3, top + radius), 171 | radius: radius), 172 | degToRad(angleOffset), 173 | degToRad(-180.0 - angleOffset), 174 | true); 175 | curStartX += (textTrueWidth + letterSpace); 176 | } 177 | canvas.drawPath(path, borderSide.toPaint()); 178 | } 179 | } 180 | 181 | class CustomUnderlineInputBorder extends InputBorder { 182 | CustomUnderlineInputBorder({ 183 | double textSize = 0.0, 184 | double letterSpace, 185 | int textLength, 186 | BorderSide borderSide = const BorderSide(), 187 | }) : super( 188 | textSize: textSize, 189 | letterSpace: letterSpace, 190 | textLength: textLength, 191 | borderSide: borderSide); 192 | 193 | double get offsetX => textTrueWidth * 0.2; 194 | 195 | @override 196 | void paint( 197 | Canvas canvas, 198 | Rect rect, { 199 | double gapStart, 200 | double gapExtent = 0.0, 201 | double gapPercentage = 0.0, 202 | TextDirection textDirection, 203 | }) { 204 | Path path = Path(); 205 | path.moveTo(rect.bottomLeft.dx + startOffset-offsetX, rect.bottomLeft.dy); 206 | path.lineTo(rect.bottomLeft.dx + (textTrueWidth + letterSpace) * textLength, 207 | rect.bottomRight.dy); 208 | path = dashPath.dashPath(path, 209 | dashArray: dashPath.CircularIntervalList([ 210 | textTrueWidth+offsetX*2, 211 | letterSpace-offsetX*2, 212 | ])); 213 | canvas.drawPath(path, borderSide.toPaint()); 214 | } 215 | } 216 | 217 | class CustomImageInputBorder extends InputBorder { 218 | final ui.Image image; 219 | 220 | CustomImageInputBorder({ 221 | @required this.image, 222 | double textSize = 0.0, 223 | double letterSpace, 224 | int textLength, 225 | BorderSide borderSide = const BorderSide(), 226 | }) : super( 227 | textSize: textSize, 228 | letterSpace: letterSpace, 229 | textLength: textLength, 230 | borderSide: borderSide); 231 | 232 | @override 233 | void paint( 234 | Canvas canvas, 235 | Rect rect, { 236 | double gapStart, 237 | double gapExtent = 0.0, 238 | double gapPercentage = 0.0, 239 | TextDirection textDirection, 240 | }) { 241 | double curStartX = rect.left; 242 | for (int i = 0; i < textLength; i++) { 243 | canvas.drawImage(image, Offset(curStartX, 0.0), Paint()); 244 | curStartX += (textTrueWidth + letterSpace); 245 | } 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /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 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 15 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 16 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 17 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 18 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 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 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 43 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 45 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 46 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 47 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 48 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 49 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 50 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 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 | 3B80C3931E831B6300D905FE /* App.framework */, 75 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 76 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 77 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 78 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 79 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 80 | ); 81 | name = Flutter; 82 | sourceTree = ""; 83 | }; 84 | 97C146E51CF9000F007C117D = { 85 | isa = PBXGroup; 86 | children = ( 87 | 9740EEB11CF90186004384FC /* Flutter */, 88 | 97C146F01CF9000F007C117D /* Runner */, 89 | 97C146EF1CF9000F007C117D /* Products */, 90 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 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 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 106 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 107 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 108 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 109 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 110 | 97C147021CF9000F007C117D /* Info.plist */, 111 | 97C146F11CF9000F007C117D /* Supporting Files */, 112 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 113 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 114 | ); 115 | path = Runner; 116 | sourceTree = ""; 117 | }; 118 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 97C146F21CF9000F007C117D /* main.m */, 122 | ); 123 | name = "Supporting Files"; 124 | sourceTree = ""; 125 | }; 126 | /* End PBXGroup section */ 127 | 128 | /* Begin PBXNativeTarget section */ 129 | 97C146ED1CF9000F007C117D /* Runner */ = { 130 | isa = PBXNativeTarget; 131 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 132 | buildPhases = ( 133 | 9740EEB61CF901F6004384FC /* Run Script */, 134 | 97C146EA1CF9000F007C117D /* Sources */, 135 | 97C146EB1CF9000F007C117D /* Frameworks */, 136 | 97C146EC1CF9000F007C117D /* Resources */, 137 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 138 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 139 | ); 140 | buildRules = ( 141 | ); 142 | dependencies = ( 143 | ); 144 | name = Runner; 145 | productName = Runner; 146 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 147 | productType = "com.apple.product-type.application"; 148 | }; 149 | /* End PBXNativeTarget section */ 150 | 151 | /* Begin PBXProject section */ 152 | 97C146E61CF9000F007C117D /* Project object */ = { 153 | isa = PBXProject; 154 | attributes = { 155 | LastUpgradeCheck = 0910; 156 | ORGANIZATIONNAME = "The Chromium Authors"; 157 | TargetAttributes = { 158 | 97C146ED1CF9000F007C117D = { 159 | CreatedOnToolsVersion = 7.3.1; 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 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 191 | ); 192 | runOnlyForDeploymentPostprocessing = 0; 193 | }; 194 | /* End PBXResourcesBuildPhase section */ 195 | 196 | /* Begin PBXShellScriptBuildPhase section */ 197 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 198 | isa = PBXShellScriptBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | ); 202 | inputPaths = ( 203 | ); 204 | name = "Thin Binary"; 205 | outputPaths = ( 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | shellPath = /bin/sh; 209 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 210 | }; 211 | 9740EEB61CF901F6004384FC /* Run Script */ = { 212 | isa = PBXShellScriptBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | ); 216 | inputPaths = ( 217 | ); 218 | name = "Run Script"; 219 | outputPaths = ( 220 | ); 221 | runOnlyForDeploymentPostprocessing = 0; 222 | shellPath = /bin/sh; 223 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 224 | }; 225 | /* End PBXShellScriptBuildPhase section */ 226 | 227 | /* Begin PBXSourcesBuildPhase section */ 228 | 97C146EA1CF9000F007C117D /* Sources */ = { 229 | isa = PBXSourcesBuildPhase; 230 | buildActionMask = 2147483647; 231 | files = ( 232 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 233 | 97C146F31CF9000F007C117D /* main.m 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 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 261 | isa = XCBuildConfiguration; 262 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.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-with-dsym"; 290 | ENABLE_NS_ASSERTIONS = NO; 291 | ENABLE_STRICT_OBJC_MSGSEND = YES; 292 | GCC_C_LANGUAGE_STANDARD = gnu99; 293 | GCC_NO_COMMON_BLOCKS = YES; 294 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 295 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 296 | GCC_WARN_UNDECLARED_SELECTOR = YES; 297 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 298 | GCC_WARN_UNUSED_FUNCTION = YES; 299 | GCC_WARN_UNUSED_VARIABLE = YES; 300 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 301 | MTL_ENABLE_DEBUG_INFO = NO; 302 | SDKROOT = iphoneos; 303 | TARGETED_DEVICE_FAMILY = "1,2"; 304 | VALIDATE_PRODUCT = YES; 305 | }; 306 | name = Profile; 307 | }; 308 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 309 | isa = XCBuildConfiguration; 310 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 311 | buildSettings = { 312 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 313 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 314 | DEVELOPMENT_TEAM = S8QB4VV633; 315 | ENABLE_BITCODE = NO; 316 | FRAMEWORK_SEARCH_PATHS = ( 317 | "$(inherited)", 318 | "$(PROJECT_DIR)/Flutter", 319 | ); 320 | INFOPLIST_FILE = Runner/Info.plist; 321 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 322 | LIBRARY_SEARCH_PATHS = ( 323 | "$(inherited)", 324 | "$(PROJECT_DIR)/Flutter", 325 | ); 326 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterUi; 327 | PRODUCT_NAME = "$(TARGET_NAME)"; 328 | VERSIONING_SYSTEM = "apple-generic"; 329 | }; 330 | name = Profile; 331 | }; 332 | 97C147031CF9000F007C117D /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_ANALYZER_NONNULL = YES; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INFINITE_RECURSION = YES; 350 | CLANG_WARN_INT_CONVERSION = YES; 351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 352 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 354 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 355 | CLANG_WARN_STRICT_PROTOTYPES = YES; 356 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 357 | CLANG_WARN_UNREACHABLE_CODE = YES; 358 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 359 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 360 | COPY_PHASE_STRIP = NO; 361 | DEBUG_INFORMATION_FORMAT = dwarf; 362 | ENABLE_STRICT_OBJC_MSGSEND = YES; 363 | ENABLE_TESTABILITY = YES; 364 | GCC_C_LANGUAGE_STANDARD = gnu99; 365 | GCC_DYNAMIC_NO_PIC = NO; 366 | GCC_NO_COMMON_BLOCKS = YES; 367 | GCC_OPTIMIZATION_LEVEL = 0; 368 | GCC_PREPROCESSOR_DEFINITIONS = ( 369 | "DEBUG=1", 370 | "$(inherited)", 371 | ); 372 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 373 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 374 | GCC_WARN_UNDECLARED_SELECTOR = YES; 375 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 376 | GCC_WARN_UNUSED_FUNCTION = YES; 377 | GCC_WARN_UNUSED_VARIABLE = YES; 378 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 379 | MTL_ENABLE_DEBUG_INFO = YES; 380 | ONLY_ACTIVE_ARCH = YES; 381 | SDKROOT = iphoneos; 382 | TARGETED_DEVICE_FAMILY = "1,2"; 383 | }; 384 | name = Debug; 385 | }; 386 | 97C147041CF9000F007C117D /* Release */ = { 387 | isa = XCBuildConfiguration; 388 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 389 | buildSettings = { 390 | ALWAYS_SEARCH_USER_PATHS = NO; 391 | CLANG_ANALYZER_NONNULL = YES; 392 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 393 | CLANG_CXX_LIBRARY = "libc++"; 394 | CLANG_ENABLE_MODULES = YES; 395 | CLANG_ENABLE_OBJC_ARC = YES; 396 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 397 | CLANG_WARN_BOOL_CONVERSION = YES; 398 | CLANG_WARN_COMMA = YES; 399 | CLANG_WARN_CONSTANT_CONVERSION = YES; 400 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 401 | CLANG_WARN_EMPTY_BODY = YES; 402 | CLANG_WARN_ENUM_CONVERSION = YES; 403 | CLANG_WARN_INFINITE_RECURSION = YES; 404 | CLANG_WARN_INT_CONVERSION = YES; 405 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 406 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 407 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 408 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 409 | CLANG_WARN_STRICT_PROTOTYPES = YES; 410 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 411 | CLANG_WARN_UNREACHABLE_CODE = YES; 412 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 413 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 414 | COPY_PHASE_STRIP = NO; 415 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 416 | ENABLE_NS_ASSERTIONS = NO; 417 | ENABLE_STRICT_OBJC_MSGSEND = YES; 418 | GCC_C_LANGUAGE_STANDARD = gnu99; 419 | GCC_NO_COMMON_BLOCKS = YES; 420 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 421 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 422 | GCC_WARN_UNDECLARED_SELECTOR = YES; 423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 424 | GCC_WARN_UNUSED_FUNCTION = YES; 425 | GCC_WARN_UNUSED_VARIABLE = YES; 426 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 427 | MTL_ENABLE_DEBUG_INFO = NO; 428 | SDKROOT = iphoneos; 429 | TARGETED_DEVICE_FAMILY = "1,2"; 430 | VALIDATE_PRODUCT = YES; 431 | }; 432 | name = Release; 433 | }; 434 | 97C147061CF9000F007C117D /* Debug */ = { 435 | isa = XCBuildConfiguration; 436 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 437 | buildSettings = { 438 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 439 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 440 | ENABLE_BITCODE = NO; 441 | FRAMEWORK_SEARCH_PATHS = ( 442 | "$(inherited)", 443 | "$(PROJECT_DIR)/Flutter", 444 | ); 445 | INFOPLIST_FILE = Runner/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 447 | LIBRARY_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterUi; 452 | PRODUCT_NAME = "$(TARGET_NAME)"; 453 | VERSIONING_SYSTEM = "apple-generic"; 454 | }; 455 | name = Debug; 456 | }; 457 | 97C147071CF9000F007C117D /* Release */ = { 458 | isa = XCBuildConfiguration; 459 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 460 | buildSettings = { 461 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 462 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 463 | ENABLE_BITCODE = NO; 464 | FRAMEWORK_SEARCH_PATHS = ( 465 | "$(inherited)", 466 | "$(PROJECT_DIR)/Flutter", 467 | ); 468 | INFOPLIST_FILE = Runner/Info.plist; 469 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 470 | LIBRARY_SEARCH_PATHS = ( 471 | "$(inherited)", 472 | "$(PROJECT_DIR)/Flutter", 473 | ); 474 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterUi; 475 | PRODUCT_NAME = "$(TARGET_NAME)"; 476 | VERSIONING_SYSTEM = "apple-generic"; 477 | }; 478 | name = Release; 479 | }; 480 | /* End XCBuildConfiguration section */ 481 | 482 | /* Begin XCConfigurationList section */ 483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | 97C147031CF9000F007C117D /* Debug */, 487 | 97C147041CF9000F007C117D /* Release */, 488 | 249021D3217E4FDB00AE95B9 /* Profile */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | 97C147061CF9000F007C117D /* Debug */, 497 | 97C147071CF9000F007C117D /* Release */, 498 | 249021D4217E4FDB00AE95B9 /* Profile */, 499 | ); 500 | defaultConfigurationIsVisible = 0; 501 | defaultConfigurationName = Release; 502 | }; 503 | /* End XCConfigurationList section */ 504 | }; 505 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 506 | } 507 | --------------------------------------------------------------------------------