├── 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_demo │ │ │ │ │ └── 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 ├── images └── loadMore.gif ├── README.md ├── .metadata ├── lib ├── bean │ ├── Model.dart │ └── Model.g.dart ├── base │ ├── loading_indicator.dart │ ├── loading_empty_indicator.dart │ ├── refresh_page.dart │ └── loading_more_base.dart ├── main.dart └── demo │ ├── animation.dart │ └── load_more.dart ├── test └── widget_test.dart ├── .gitignore ├── pubspec.yaml └── pubspec.lock /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 | -------------------------------------------------------------------------------- /images/loadMore.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutoumu/flutter_demo/HEAD/images/loadMore.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 上拉加载更多效果图 2 | ![效果图](https://github.com/toutoumu/flutter_demo/blob/master/images/loadMore.gif?raw=true) 3 | 4 | -------------------------------------------------------------------------------- /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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutoumu/flutter_demo/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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/toutoumu/flutter_demo/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 | -------------------------------------------------------------------------------- /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_demo/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.flutter_demo; 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/bean/Model.dart: -------------------------------------------------------------------------------- 1 | //import 'package:json_annotation/json_annotation.dart'; 2 | import 'package:json_annotation/json_annotation.dart'; 3 | 4 | part 'Model.g.dart'; 5 | 6 | @JsonSerializable() 7 | class Model extends Object { 8 | int code; 9 | String message; 10 | dynamic data; 11 | 12 | bool isSuccess() { 13 | return this.code == 0; 14 | } 15 | 16 | bool isError() { 17 | return !isSuccess(); 18 | } 19 | 20 | Model({this.code, this.message, this.data}); 21 | 22 | factory Model.fromJson(Map json) => _$ModelFromJson(json); 23 | 24 | Map toJson() => _$ModelToJson(this); 25 | } 26 | 27 | @JsonSerializable() 28 | class Article { 29 | String title; 30 | 31 | Article({this.title}); 32 | 33 | factory Article.fromJson(Map json) => _$ArticleFromJson(json); 34 | 35 | Map toJson() => _$ArticleToJson(this); 36 | } 37 | -------------------------------------------------------------------------------- /lib/bean/Model.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'Model.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Model _$ModelFromJson(Map json) { 10 | return Model( 11 | code: json['code'] as int, 12 | message: json['message'] as String, 13 | data: json['data']); 14 | } 15 | 16 | Map _$ModelToJson(Model instance) => { 17 | 'code': instance.code, 18 | 'message': instance.message, 19 | 'data': instance.data 20 | }; 21 | 22 | Article _$ArticleFromJson(Map json) { 23 | return Article(title: json['title'] as String); 24 | } 25 | 26 | Map _$ArticleToJson(Article instance) => 27 | {'title': instance.title}; 28 | -------------------------------------------------------------------------------- /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_demo/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/base/loading_indicator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_demo/base/loading_more_base.dart'; 3 | 4 | /// 加载更多 列表的最后一项, 用于显示当前的状态 5 | class LoadingIndicator extends StatelessWidget { 6 | final DataLoadMoreBase dataLoader; 7 | 8 | /// [dataLoader] 类型为[DataLoadMoreBase] 9 | const LoadingIndicator({Key key, this.dataLoader}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | Widget _indicator; 14 | if (dataLoader.isLoading) { 15 | _indicator = Text("正在加载中..."); 16 | } else if (dataLoader.hasException) { 17 | // 网络异常 18 | _indicator = Text("网络异常..."); 19 | } else if (dataLoader.hasError) { 20 | // 出错了 21 | _indicator = Text("出错了..."); 22 | } else if (!dataLoader.hasMore()) { 23 | // 没有更多 24 | _indicator = Text("没有更多..."); 25 | } else if (dataLoader.hasMore()) { 26 | // 还有更多 27 | _indicator = Text("还有更多..."); 28 | } else { 29 | _indicator = Text("..."); 30 | } 31 | return Container( 32 | padding: EdgeInsets.all(16), 33 | alignment: Alignment.center, 34 | child: _indicator, 35 | ); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_demo/demo/animation.dart'; 3 | import 'package:flutter_demo/demo/load_more.dart'; 4 | 5 | void main() => runApp(MyApp()); 6 | 7 | class MyApp extends StatelessWidget { 8 | // This widget is the root of your application. 9 | @override 10 | Widget build(BuildContext context) { 11 | return MaterialApp( 12 | title: 'Flutter Demo', 13 | theme: ThemeData(primarySwatch: Colors.blue, scaffoldBackgroundColor: Colors.grey[200]), 14 | home: MainPage(), 15 | ); 16 | } 17 | } 18 | 19 | class MainPage extends StatelessWidget { 20 | void _push(BuildContext context, Widget widget) { 21 | Navigator.push(context, new MaterialPageRoute(builder: (BuildContext context) { 22 | return widget; 23 | })); 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return Scaffold( 29 | backgroundColor: Colors.grey[200], 30 | appBar: AppBar( 31 | title: Text('加载更多示例'), 32 | ), 33 | body: ListView( 34 | padding: EdgeInsets.all(8), 35 | children: [ 36 | RaisedButton(child: Text("加载更多"), onPressed: () => _push(context, new LoaderMoreDemo(1))), 37 | RaisedButton(child: Text("动画"), onPressed: () => _push(context, new AnimationPage())), 38 | ], 39 | ), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /.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/base/loading_empty_indicator.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_demo/base/loading_more_base.dart'; 3 | 4 | /// 加载更多 没有数据时, 用于显示当前的状态 5 | class LoadingEmptyIndicator extends StatelessWidget { 6 | final DataLoadMoreBase dataLoader; 7 | 8 | /// [dataLoader] 类型为[DataLoadMoreBase] 9 | const LoadingEmptyIndicator({Key key, this.dataLoader}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | if (dataLoader != null && !dataLoader.hasData) { 14 | if (dataLoader.pageState == PageState.Loading) { 15 | return Container( 16 | child: Center(child: new Text('Loading...')), 17 | ); 18 | } 19 | 20 | if (dataLoader.pageState == PageState.LoadingException) { 21 | return Material( 22 | child: InkWell( 23 | onTap: () => dataLoader.obtainData(false), 24 | child: Center(child: new Text('网络异常...')), 25 | ), 26 | ); 27 | } 28 | 29 | if (dataLoader.pageState == PageState.LoadingError) { 30 | return Material( 31 | child: InkWell( 32 | onTap: () => dataLoader.obtainData(false), 33 | child: Center(child: new Text('业务逻辑错误...')), 34 | ), 35 | ); 36 | } 37 | 38 | return Material( 39 | child: InkWell( 40 | onTap: () => dataLoader.obtainData(false), 41 | child: Center(child: new Text('暂无数据...')), 42 | ), 43 | ); 44 | } 45 | return Container( 46 | child: Center(child: new Text('欢迎光临...')), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /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_demo 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_demo" 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 | -------------------------------------------------------------------------------- /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/base/refresh_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_demo/base/loading_more_base.dart'; 3 | 4 | /// 构造内容 5 | typedef RefreshPageContentBuilder = Widget Function(BuildContext context, DataLoadBase status); 6 | 7 | /// 构造欢迎页面,也就是没有动作之前的页面 8 | typedef WelcomeContentBuilder = Widget Function(BuildContext context); 9 | 10 | /// 类似网页 打开的时候加载内容显示(加载中), 加载失败了(显示加载失败)可以点击再次加载 11 | class RefreshPage extends StatelessWidget { 12 | final DataLoadBase _dataLoader; 13 | 14 | final RefreshPageContentBuilder _contentBuilder; 15 | 16 | final WelcomeContentBuilder welcomeBuilder; 17 | 18 | RefreshPage(this._dataLoader, this._contentBuilder, {this.welcomeBuilder}); 19 | 20 | @override 21 | Widget build(BuildContext context) { 22 | return StreamBuilder( 23 | stream: _dataLoader.stream, 24 | builder: (context, snapshot) { 25 | var data = snapshot.data; 26 | if (data == null) { 27 | if (welcomeBuilder != null) { 28 | return welcomeBuilder(context); 29 | } 30 | return _buildWelcome(context); 31 | } 32 | 33 | // 数据为空 34 | if (!data.hasData) { 35 | if (data.isLoading) return _buildLoading(); // 加载中 36 | if (data.hasError) return _buildError(); // 业务逻辑错误 37 | if (data.hasException) return _buildException(); // 网络异常 38 | return _buildEmpty(); // 没有数据 39 | } 40 | // 有数据构建内容区域 41 | return _contentBuilder(context, snapshot.data); 42 | }); 43 | } 44 | 45 | Widget _buildLoading() { 46 | return new Container( 47 | alignment: Alignment.center, 48 | child: Text('加载中...'), 49 | ); 50 | } 51 | 52 | Widget _buildEmpty() { 53 | return new Material( 54 | child: InkWell( 55 | onTap: () => _dataLoader.obtainData(false), 56 | child: Center(child: Text('暂无数据...')), 57 | ), 58 | ); 59 | } 60 | 61 | Widget _buildError() { 62 | return new Material( 63 | child: InkWell( 64 | onTap: () => _dataLoader.obtainData(false), 65 | child: Center(child: Text('暂无数据...')), 66 | ), 67 | ); 68 | } 69 | 70 | Widget _buildException() { 71 | return new Material( 72 | child: InkWell( 73 | onTap: () => _dataLoader.obtainData(false), 74 | child: Center(child: Text('网络异常...')), 75 | ), 76 | ); 77 | } 78 | 79 | Widget _buildWelcome(BuildContext context) { 80 | return new Container( 81 | alignment: Alignment.center, 82 | child: Text('欢迎...'), 83 | ); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/demo/animation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AnimationPage extends StatefulWidget { 4 | @override 5 | State createState() { 6 | return AnimationPageState(); 7 | } 8 | } 9 | 10 | class AnimationPageState extends State with TickerProviderStateMixin { 11 | AnimationController _controller; 12 | Animation _color; 13 | 14 | bool forward = true; 15 | 16 | @override 17 | void initState() { 18 | _controller = new AnimationController(vsync: this, duration: Duration(seconds: 5)); 19 | _color = ColorTween(begin: Colors.blue[300], end: Colors.red[900]).animate(_controller); 20 | /*_controller.addStatusListener((status) { 21 | if (status == AnimationStatus.completed) { 22 | _controller.reverse(); 23 | } else if (status == AnimationStatus.dismissed) { 24 | _controller.forward(); 25 | } 26 | print(status); 27 | });*/ 28 | /*_controller.addListener(() { 29 | setState(() {}); 30 | });*/ 31 | 32 | super.initState(); 33 | } 34 | 35 | @override 36 | void reassemble() { 37 | super.reassemble(); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return Scaffold( 43 | appBar: AppBar( 44 | title: Text("动画"), 45 | ), 46 | body: Center( 47 | child: Container( 48 | alignment: Alignment.center, 49 | width: 200, 50 | height: 200, 51 | child: RotationTransition( 52 | alignment: Alignment.center, 53 | turns: ReverseTween(Tween(end: 100, begin: 90)).animate(_controller), 54 | child: InkWell( 55 | onTap: () => _controller.repeat(), 56 | child: Container(color: Colors.red), 57 | ), 58 | ) 59 | /*child: AnimatedBuilder( 60 | animation: _controller, 61 | builder: (BuildContext context, Widget child) { 62 | return Material( 63 | color: _color.value, 64 | child: InkWell( 65 | child: Padding( 66 | child: Text("adf"), 67 | padding: const EdgeInsets.all(8.0), 68 | ), 69 | onTap: () { 70 | if (forward) 71 | _controller.forward(); //向前播放动画 72 | else 73 | _controller.reverse(); //向后播放动画 74 | forward = !forward; 75 | }, 76 | )); 77 | }, 78 | ),*/ 79 | ), 80 | ), 81 | ); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_demo 2 | description: A new Flutter application. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # 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 | json_annotation: ^2.0.0 #json处理 27 | rxdart: ^0.21.0 #类似rxJava https://pub.dartlang.org/packages/rxdart#-readme-tab- 28 | 29 | dev_dependencies: 30 | flutter_test: 31 | sdk: flutter 32 | build_runner: ^1.1.2 33 | json_serializable: ^2.0.0 34 | 35 | 36 | # For information on the generic Dart part of this file, see the 37 | # following page: https://www.dartlang.org/tools/pub/pubspec 38 | 39 | # The following section is specific to Flutter. 40 | flutter: 41 | 42 | # The following line ensures that the Material Icons font is 43 | # included with your application, so that you can use the icons in 44 | # the material Icons class. 45 | uses-material-design: true 46 | 47 | # To add assets to your application, add an assets section, like this: 48 | # assets: 49 | # - images/a_dot_burr.jpeg 50 | # - images/a_dot_ham.jpeg 51 | 52 | # An image asset can refer to one or more resolution-specific "variants", see 53 | # https://flutter.io/assets-and-images/#resolution-aware. 54 | 55 | # For details regarding adding assets from package dependencies, see 56 | # https://flutter.io/assets-and-images/#from-packages 57 | 58 | # To add custom fonts to your application, add a fonts section here, 59 | # in this "flutter" section. Each entry in this list should have a 60 | # "family" key with the font family name, and a "fonts" key with a 61 | # list giving the asset and other descriptors for the font. For 62 | # example: 63 | # fonts: 64 | # - family: Schyler 65 | # fonts: 66 | # - asset: fonts/Schyler-Regular.ttf 67 | # - asset: fonts/Schyler-Italic.ttf 68 | # style: italic 69 | # - family: Trajan Pro 70 | # fonts: 71 | # - asset: fonts/TrajanPro.ttf 72 | # - asset: fonts/TrajanPro_Bold.ttf 73 | # weight: 700 74 | # 75 | # For details regarding fonts from package dependencies, 76 | # see https://flutter.io/custom-fonts/#from-packages 77 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner.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/demo/load_more.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_demo/base/loading_empty_indicator.dart'; 3 | import 'package:flutter_demo/base/loading_indicator.dart'; 4 | import 'package:flutter_demo/base/loading_more_base.dart'; 5 | import 'package:flutter_demo/bean/Model.dart'; 6 | 7 | /// 上拉加载更多 8 | class LoaderMoreDemo extends StatefulWidget { 9 | final int _id; 10 | 11 | const LoaderMoreDemo(this._id, {Key key}) : super(key: key); 12 | 13 | @override 14 | _LoaderMoreDemoState createState() => _LoaderMoreDemoState(); 15 | } 16 | 17 | class _LoaderMoreDemoState extends State with AutomaticKeepAliveClientMixin { 18 | /// 数据加载类 19 | _DataLoader _loader; 20 | 21 | @override 22 | bool get wantKeepAlive => true; 23 | 24 | @override 25 | void initState() { 26 | _loader = _DataLoader(widget._id); 27 | _loader.obtainData(false); 28 | super.initState(); 29 | } 30 | 31 | @override 32 | void dispose() { 33 | _loader.dispose(); 34 | super.dispose(); 35 | } 36 | 37 | Widget build(BuildContext context) { 38 | return Scaffold( 39 | backgroundColor: Colors.grey[200], 40 | appBar: AppBar( 41 | title: Text('加载更多示例'), 42 | ), 43 | body: StreamBuilder>( 44 | stream: _loader.stream, 45 | builder: (context, snapshot) { 46 | /// 监听滑动结束广播 47 | return NotificationListener( 48 | onNotification: (notification) { 49 | if (notification.depth != 0) return false; 50 | if (notification.metrics.axisDirection != AxisDirection.down) return false; 51 | if (notification.metrics.pixels < notification.metrics.maxScrollExtent) return false; 52 | 53 | /// 如果没有更多, 服务返回错误信息, 网络异常,那么不允许上拉加载更多 54 | if (snapshot.data == null || 55 | !snapshot.data.hasMore() || 56 | snapshot.data.hasError || 57 | snapshot.data.hasException) return false; 58 | 59 | // 加载更多 60 | _loader.obtainData(false); 61 | return false; 62 | }, 63 | 64 | /// 下拉刷新 65 | child: RefreshIndicator( 66 | child: _buildList(snapshot.data), 67 | onRefresh: () => _loader.obtainData(true), 68 | )); 69 | }), 70 | ); 71 | } 72 | 73 | Widget _buildList(DataLoadMoreBase dataLoader) { 74 | /// 初始化时显示的View 75 | if (dataLoader == null) { 76 | return Container( 77 | child: Center(child: new Text('欢迎光临...')), 78 | ); 79 | } 80 | 81 | /// 没有数据时候显示的View构建 82 | if (!dataLoader.hasData) { 83 | return LoadingEmptyIndicator(dataLoader: dataLoader); 84 | } 85 | 86 | /// 渲染数据 ,这里数据+1 1表示最后一项,用于显示加载状态 87 | return ListView.separated( 88 | itemCount: dataLoader.length + 1, 89 | physics: const AlwaysScrollableScrollPhysics(), 90 | separatorBuilder: (content, index) { 91 | return new Container(height: 0.5, color: Colors.grey); 92 | }, 93 | itemBuilder: (context, index) { 94 | if (index == dataLoader.length) { 95 | return LoadingIndicator(dataLoader: dataLoader); 96 | } else { 97 | return Material( 98 | color: Colors.white, 99 | child: new InkWell( 100 | child: Padding( 101 | padding: EdgeInsets.all(32), 102 | child: Text(dataLoader[index].title), 103 | ), 104 | onTap: () {}, 105 | ), 106 | ); 107 | } 108 | }, 109 | ); 110 | } 111 | } 112 | 113 | /// 数据业务逻辑处理 114 | class _DataLoader extends DataLoadMoreBase { 115 | bool _hasMore = true; 116 | 117 | int _id; // 请求时的参数 118 | 119 | _DataLoader(this._id); 120 | 121 | @override 122 | Future getRequest(bool isRefresh, int currentPage, int pageSize) async { 123 | // 这里模拟网络请求 124 | var list = List(); 125 | for (var i = 0; i < 10; i++) { 126 | var article = Article(title: "Article$currentPage $_id $i"); 127 | list.add(article); 128 | } 129 | await Future.delayed(Duration(seconds: 2)); 130 | 131 | return Model(data: list, message: "加载成功", code: 0); 132 | } 133 | 134 | @override 135 | Future handlerData(Model model, bool isRefresh) async { 136 | // 1. 判断是否有业务错误, 137 | // 2. 将数据存入列表, 如果是刷新清空数据 138 | // 3. 判断是否有更多数据 139 | if (model == null || model.isError()) { 140 | return false; 141 | } 142 | 143 | if (isRefresh) clear(); 144 | 145 | // todo 实际使用时这里需要修改 146 | addAll((model.data as List).map((d) { 147 | return d as Article; 148 | })); 149 | 150 | _hasMore = length < 100; 151 | 152 | return true; 153 | } 154 | 155 | @override 156 | bool hasMore() => _hasMore; 157 | } 158 | -------------------------------------------------------------------------------- /lib/base/loading_more_base.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'dart:collection'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:rxdart/rxdart.dart'; 6 | 7 | enum PageState { 8 | None, // 现在什么也没做(网络请求前,网络请求完成) 9 | Loading, // 加载中 10 | LoadingError, // 加载失败(业务逻辑错误) 11 | LoadingException, // 网络异常 12 | } 13 | 14 | /// [DATA] 列表中的数据的数据类型 15 | /// [MODEL] 服务返回的数据结构对应的数据类 16 | abstract class DataLoadBase extends _DataLoadBloc> { 17 | DATA mData; 18 | 19 | /// 是否有业务错误 20 | bool get hasError => _pageState == PageState.LoadingError; 21 | 22 | /// 是否有网络异常 23 | bool get hasException => _pageState == PageState.LoadingException; 24 | 25 | /// 是否加载中 26 | bool get isLoading => _pageState == PageState.Loading; 27 | 28 | /// 页面状态 29 | PageState get pageState => _pageState; 30 | 31 | /// 页面状态 32 | PageState _pageState = PageState.None; 33 | 34 | bool get hasData { 35 | if (mData == null) { 36 | return false; 37 | } 38 | if (mData is List) { 39 | return (mData as List).length > 0; 40 | } 41 | return true; 42 | } 43 | 44 | @mustCallSuper 45 | Future obtainData([bool isRefresh = false]) async { 46 | if (isLoading) return true; 47 | _pageState = PageState.Loading; 48 | onStateChanged(this); 49 | 50 | var success = false; 51 | try { 52 | success = await _loadData(isRefresh); 53 | if (success) { 54 | // 加载数据成功 55 | _pageState = PageState.None; 56 | } else { 57 | // 加载数据业务逻辑错误 58 | _pageState = PageState.LoadingError; 59 | } 60 | } catch (e) { 61 | // 网络异常 62 | _pageState = PageState.LoadingException; 63 | } 64 | 65 | onStateChanged(this); 66 | return success; 67 | } 68 | 69 | /// 加载数据 70 | Future _loadData([bool isRefresh = false]) async { 71 | MODEL model = await getRequest(isRefresh); 72 | bool success = await handlerData(model, isRefresh); 73 | return success; 74 | } 75 | 76 | @protected 77 | Future getRequest(bool isRefresh); 78 | 79 | /// 重载这个方法,必须在这个方法将数据添加到列表中 80 | /// [model] 本次请求回来的数据 81 | /// [isRefresh] 是否清空原来的数据 82 | @protected 83 | Future handlerData(MODEL model, bool isRefresh); 84 | } 85 | 86 | /// [DATA] 列表中的数据的数据类型 87 | /// [MODEL] 服务返回的数据结构对应的数据类 88 | abstract class DataLoadMoreBase extends ListBase { 89 | /// 使用 BehaviorSubject 会保留最后一次的值,所有监听是会受到回调 90 | final _streamController = new BehaviorSubject>(); 91 | 92 | /// 页面通过监听stream变化更新界面 93 | Stream> get stream => _streamController.stream; 94 | 95 | void onStateChanged(DataLoadMoreBase source) { 96 | if (!_streamController.isClosed) _streamController.add(source); 97 | } 98 | 99 | void dispose() { 100 | _streamController.close(); 101 | } 102 | 103 | final _mData = []; 104 | 105 | @override 106 | DATA operator [](int index) { 107 | return _mData[index]; 108 | } 109 | 110 | @override 111 | void operator []=(int index, DATA value) { 112 | _mData[index] = value; 113 | } 114 | 115 | @override 116 | int get length => _mData.length; 117 | 118 | @override 119 | set length(int newLength) => _mData.length = newLength; 120 | 121 | final _pageSize = 20; 122 | 123 | int _currentPage = 1; 124 | 125 | /// 页面状态 126 | PageState _pageState = PageState.None; 127 | 128 | /// 是否有数据 129 | bool get hasData => this.length > 0; 130 | 131 | /// 是否有业务错误 132 | bool get hasError => _pageState == PageState.LoadingError; 133 | 134 | /// 是否有网络异常 135 | bool get hasException => _pageState == PageState.LoadingException; 136 | 137 | /// 是否加载中 138 | bool get isLoading => _pageState == PageState.Loading; 139 | 140 | /// 页面状态 141 | PageState get pageState => _pageState; 142 | 143 | /// 拉取数据 144 | /// [isRefresh] 是否清空原来的数据 145 | @mustCallSuper 146 | Future obtainData([bool isRefresh = false]) async { 147 | if (isLoading) return true; 148 | 149 | _pageState = PageState.Loading; 150 | onStateChanged(this); 151 | 152 | var success = false; 153 | try { 154 | success = await _loadData(isRefresh); 155 | if (success) { 156 | // 加载数据成功 157 | _pageState = PageState.None; 158 | } else { 159 | // 加载数据业务逻辑错误 160 | _pageState = PageState.LoadingError; 161 | } 162 | } catch (e) { 163 | // 网络异常 164 | _pageState = PageState.LoadingException; 165 | } 166 | 167 | onStateChanged(this); 168 | return success; 169 | } 170 | 171 | /// 加载数据 172 | /// [isRefresh] 是否清空原来的数据 173 | Future _loadData([bool isRefresh = false]) async { 174 | int currentPage = isRefresh ? 1 : _currentPage + 1; 175 | MODEL model = await getRequest(isRefresh, currentPage, _pageSize); 176 | bool success = await handlerData(model, isRefresh); 177 | if (success) _currentPage = currentPage; 178 | return success; 179 | } 180 | 181 | /// 是否还有更多数据 182 | @protected 183 | bool hasMore(); 184 | 185 | /// 构造请求 186 | /// [isRefresh] 是否清空原来的数据 187 | /// [currentPage] 将要请求的页码 188 | /// [pageSize] 每页多少数据 189 | @protected 190 | Future getRequest(bool isRefresh, int currentPage, int pageSize); 191 | 192 | /// 重载这个方法,必须在这个方法将数据添加到列表中 193 | /// [model] 本次请求回来的数据 194 | /// [isRefresh] 是否清空原来的数据 195 | @protected 196 | Future handlerData(MODEL model, bool isRefresh); 197 | } 198 | 199 | /// 数据加载Bloc 200 | class _DataLoadBloc { 201 | /// 使用 BehaviorSubject 会保留最后一次的值,所有监听是会受到回调 202 | final _streamController = new BehaviorSubject(); 203 | 204 | // final _streamController = new StreamController>.broadcast(); 205 | 206 | Stream get stream => _streamController.stream; 207 | 208 | void onStateChanged(T source) { 209 | if (!_streamController.isClosed) _streamController.add(source); 210 | } 211 | 212 | void dispose() { 213 | _streamController.close(); 214 | } 215 | } 216 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.flutter-io.cn" 9 | source: hosted 10 | version: "0.35.3" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "1.5.1" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "2.0.8" 25 | boolean_selector: 26 | dependency: transitive 27 | description: 28 | name: boolean_selector 29 | url: "https://pub.flutter-io.cn" 30 | source: hosted 31 | version: "1.0.4" 32 | build: 33 | dependency: transitive 34 | description: 35 | name: build 36 | url: "https://pub.flutter-io.cn" 37 | source: hosted 38 | version: "1.1.1" 39 | build_config: 40 | dependency: transitive 41 | description: 42 | name: build_config 43 | url: "https://pub.flutter-io.cn" 44 | source: hosted 45 | version: "0.3.1+4" 46 | build_daemon: 47 | dependency: transitive 48 | description: 49 | name: build_daemon 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "0.4.2" 53 | build_resolvers: 54 | dependency: transitive 55 | description: 56 | name: build_resolvers 57 | url: "https://pub.flutter-io.cn" 58 | source: hosted 59 | version: "1.0.3" 60 | build_runner: 61 | dependency: "direct dev" 62 | description: 63 | name: build_runner 64 | url: "https://pub.flutter-io.cn" 65 | source: hosted 66 | version: "1.2.8" 67 | build_runner_core: 68 | dependency: transitive 69 | description: 70 | name: build_runner_core 71 | url: "https://pub.flutter-io.cn" 72 | source: hosted 73 | version: "2.0.3" 74 | built_collection: 75 | dependency: transitive 76 | description: 77 | name: built_collection 78 | url: "https://pub.flutter-io.cn" 79 | source: hosted 80 | version: "4.1.0" 81 | built_value: 82 | dependency: transitive 83 | description: 84 | name: built_value 85 | url: "https://pub.flutter-io.cn" 86 | source: hosted 87 | version: "6.3.2" 88 | charcode: 89 | dependency: transitive 90 | description: 91 | name: charcode 92 | url: "https://pub.flutter-io.cn" 93 | source: hosted 94 | version: "1.1.2" 95 | code_builder: 96 | dependency: transitive 97 | description: 98 | name: code_builder 99 | url: "https://pub.flutter-io.cn" 100 | source: hosted 101 | version: "3.2.0" 102 | collection: 103 | dependency: transitive 104 | description: 105 | name: collection 106 | url: "https://pub.flutter-io.cn" 107 | source: hosted 108 | version: "1.14.11" 109 | convert: 110 | dependency: transitive 111 | description: 112 | name: convert 113 | url: "https://pub.flutter-io.cn" 114 | source: hosted 115 | version: "2.1.1" 116 | crypto: 117 | dependency: transitive 118 | description: 119 | name: crypto 120 | url: "https://pub.flutter-io.cn" 121 | source: hosted 122 | version: "2.0.6" 123 | csslib: 124 | dependency: transitive 125 | description: 126 | name: csslib 127 | url: "https://pub.flutter-io.cn" 128 | source: hosted 129 | version: "0.14.6" 130 | cupertino_icons: 131 | dependency: "direct main" 132 | description: 133 | name: cupertino_icons 134 | url: "https://pub.flutter-io.cn" 135 | source: hosted 136 | version: "0.1.2" 137 | dart_style: 138 | dependency: transitive 139 | description: 140 | name: dart_style 141 | url: "https://pub.flutter-io.cn" 142 | source: hosted 143 | version: "1.2.3" 144 | fixnum: 145 | dependency: transitive 146 | description: 147 | name: fixnum 148 | url: "https://pub.flutter-io.cn" 149 | source: hosted 150 | version: "0.10.9" 151 | flutter: 152 | dependency: "direct main" 153 | description: flutter 154 | source: sdk 155 | version: "0.0.0" 156 | flutter_test: 157 | dependency: "direct dev" 158 | description: flutter 159 | source: sdk 160 | version: "0.0.0" 161 | front_end: 162 | dependency: transitive 163 | description: 164 | name: front_end 165 | url: "https://pub.flutter-io.cn" 166 | source: hosted 167 | version: "0.1.13" 168 | glob: 169 | dependency: transitive 170 | description: 171 | name: glob 172 | url: "https://pub.flutter-io.cn" 173 | source: hosted 174 | version: "1.1.7" 175 | graphs: 176 | dependency: transitive 177 | description: 178 | name: graphs 179 | url: "https://pub.flutter-io.cn" 180 | source: hosted 181 | version: "0.2.0" 182 | html: 183 | dependency: transitive 184 | description: 185 | name: html 186 | url: "https://pub.flutter-io.cn" 187 | source: hosted 188 | version: "0.13.4+1" 189 | http: 190 | dependency: transitive 191 | description: 192 | name: http 193 | url: "https://pub.flutter-io.cn" 194 | source: hosted 195 | version: "0.12.0+1" 196 | http_multi_server: 197 | dependency: transitive 198 | description: 199 | name: http_multi_server 200 | url: "https://pub.flutter-io.cn" 201 | source: hosted 202 | version: "2.0.5" 203 | http_parser: 204 | dependency: transitive 205 | description: 206 | name: http_parser 207 | url: "https://pub.flutter-io.cn" 208 | source: hosted 209 | version: "3.1.3" 210 | io: 211 | dependency: transitive 212 | description: 213 | name: io 214 | url: "https://pub.flutter-io.cn" 215 | source: hosted 216 | version: "0.3.3" 217 | js: 218 | dependency: transitive 219 | description: 220 | name: js 221 | url: "https://pub.flutter-io.cn" 222 | source: hosted 223 | version: "0.6.1+1" 224 | json_annotation: 225 | dependency: "direct main" 226 | description: 227 | name: json_annotation 228 | url: "https://pub.flutter-io.cn" 229 | source: hosted 230 | version: "2.0.0" 231 | json_serializable: 232 | dependency: "direct dev" 233 | description: 234 | name: json_serializable 235 | url: "https://pub.flutter-io.cn" 236 | source: hosted 237 | version: "2.0.2" 238 | kernel: 239 | dependency: transitive 240 | description: 241 | name: kernel 242 | url: "https://pub.flutter-io.cn" 243 | source: hosted 244 | version: "0.3.13" 245 | logging: 246 | dependency: transitive 247 | description: 248 | name: logging 249 | url: "https://pub.flutter-io.cn" 250 | source: hosted 251 | version: "0.11.3+2" 252 | matcher: 253 | dependency: transitive 254 | description: 255 | name: matcher 256 | url: "https://pub.flutter-io.cn" 257 | source: hosted 258 | version: "0.12.3+1" 259 | meta: 260 | dependency: transitive 261 | description: 262 | name: meta 263 | url: "https://pub.flutter-io.cn" 264 | source: hosted 265 | version: "1.1.6" 266 | mime: 267 | dependency: transitive 268 | description: 269 | name: mime 270 | url: "https://pub.flutter-io.cn" 271 | source: hosted 272 | version: "0.9.6+2" 273 | package_config: 274 | dependency: transitive 275 | description: 276 | name: package_config 277 | url: "https://pub.flutter-io.cn" 278 | source: hosted 279 | version: "1.0.5" 280 | package_resolver: 281 | dependency: transitive 282 | description: 283 | name: package_resolver 284 | url: "https://pub.flutter-io.cn" 285 | source: hosted 286 | version: "1.0.10" 287 | path: 288 | dependency: transitive 289 | description: 290 | name: path 291 | url: "https://pub.flutter-io.cn" 292 | source: hosted 293 | version: "1.6.2" 294 | pedantic: 295 | dependency: transitive 296 | description: 297 | name: pedantic 298 | url: "https://pub.flutter-io.cn" 299 | source: hosted 300 | version: "1.4.0" 301 | plugin: 302 | dependency: transitive 303 | description: 304 | name: plugin 305 | url: "https://pub.flutter-io.cn" 306 | source: hosted 307 | version: "0.2.0+3" 308 | pool: 309 | dependency: transitive 310 | description: 311 | name: pool 312 | url: "https://pub.flutter-io.cn" 313 | source: hosted 314 | version: "1.4.0" 315 | pub_semver: 316 | dependency: transitive 317 | description: 318 | name: pub_semver 319 | url: "https://pub.flutter-io.cn" 320 | source: hosted 321 | version: "1.4.2" 322 | pubspec_parse: 323 | dependency: transitive 324 | description: 325 | name: pubspec_parse 326 | url: "https://pub.flutter-io.cn" 327 | source: hosted 328 | version: "0.1.4" 329 | quiver: 330 | dependency: transitive 331 | description: 332 | name: quiver 333 | url: "https://pub.flutter-io.cn" 334 | source: hosted 335 | version: "2.0.1" 336 | rxdart: 337 | dependency: "direct main" 338 | description: 339 | name: rxdart 340 | url: "https://pub.flutter-io.cn" 341 | source: hosted 342 | version: "0.21.0" 343 | shelf: 344 | dependency: transitive 345 | description: 346 | name: shelf 347 | url: "https://pub.flutter-io.cn" 348 | source: hosted 349 | version: "0.7.4" 350 | shelf_web_socket: 351 | dependency: transitive 352 | description: 353 | name: shelf_web_socket 354 | url: "https://pub.flutter-io.cn" 355 | source: hosted 356 | version: "0.2.2+4" 357 | sky_engine: 358 | dependency: transitive 359 | description: flutter 360 | source: sdk 361 | version: "0.0.99" 362 | source_gen: 363 | dependency: transitive 364 | description: 365 | name: source_gen 366 | url: "https://pub.flutter-io.cn" 367 | source: hosted 368 | version: "0.9.4+1" 369 | source_span: 370 | dependency: transitive 371 | description: 372 | name: source_span 373 | url: "https://pub.flutter-io.cn" 374 | source: hosted 375 | version: "1.5.4" 376 | stack_trace: 377 | dependency: transitive 378 | description: 379 | name: stack_trace 380 | url: "https://pub.flutter-io.cn" 381 | source: hosted 382 | version: "1.9.3" 383 | stream_channel: 384 | dependency: transitive 385 | description: 386 | name: stream_channel 387 | url: "https://pub.flutter-io.cn" 388 | source: hosted 389 | version: "1.6.8" 390 | stream_transform: 391 | dependency: transitive 392 | description: 393 | name: stream_transform 394 | url: "https://pub.flutter-io.cn" 395 | source: hosted 396 | version: "0.0.15" 397 | string_scanner: 398 | dependency: transitive 399 | description: 400 | name: string_scanner 401 | url: "https://pub.flutter-io.cn" 402 | source: hosted 403 | version: "1.0.4" 404 | term_glyph: 405 | dependency: transitive 406 | description: 407 | name: term_glyph 408 | url: "https://pub.flutter-io.cn" 409 | source: hosted 410 | version: "1.1.0" 411 | test_api: 412 | dependency: transitive 413 | description: 414 | name: test_api 415 | url: "https://pub.flutter-io.cn" 416 | source: hosted 417 | version: "0.2.2" 418 | timing: 419 | dependency: transitive 420 | description: 421 | name: timing 422 | url: "https://pub.flutter-io.cn" 423 | source: hosted 424 | version: "0.1.1+1" 425 | typed_data: 426 | dependency: transitive 427 | description: 428 | name: typed_data 429 | url: "https://pub.flutter-io.cn" 430 | source: hosted 431 | version: "1.1.6" 432 | utf: 433 | dependency: transitive 434 | description: 435 | name: utf 436 | url: "https://pub.flutter-io.cn" 437 | source: hosted 438 | version: "0.9.0+5" 439 | vector_math: 440 | dependency: transitive 441 | description: 442 | name: vector_math 443 | url: "https://pub.flutter-io.cn" 444 | source: hosted 445 | version: "2.0.8" 446 | watcher: 447 | dependency: transitive 448 | description: 449 | name: watcher 450 | url: "https://pub.flutter-io.cn" 451 | source: hosted 452 | version: "0.9.7+10" 453 | web_socket_channel: 454 | dependency: transitive 455 | description: 456 | name: web_socket_channel 457 | url: "https://pub.flutter-io.cn" 458 | source: hosted 459 | version: "1.0.9" 460 | yaml: 461 | dependency: transitive 462 | description: 463 | name: yaml 464 | url: "https://pub.flutter-io.cn" 465 | source: hosted 466 | version: "2.1.15" 467 | sdks: 468 | dart: ">=2.1.0 <3.0.0" 469 | -------------------------------------------------------------------------------- /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.flutterDemo; 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.flutterDemo; 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.flutterDemo; 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 | --------------------------------------------------------------------------------