├── ios ├── Runner │ ├── Runner-Bridging-Header.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 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ └── contents.xcworkspacedata ├── Podfile.lock └── Podfile ├── img ├── img_a.png └── pic_b.png ├── 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 │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── flutter_http_utils │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── settings.gradle └── build.gradle ├── .metadata ├── lib ├── http_util │ ├── base_response.dart │ ├── request_listener.dart │ └── my_http_util.dart ├── bloc │ ├── bloc_provider.dart │ └── music_bloc.dart ├── bean │ ├── music.dart │ └── music.g.dart └── main.dart ├── test └── widget_test.dart ├── .gitignore ├── README.md ├── pubspec.yaml └── pubspec.lock /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /img/img_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhoujiulong/FlutterHttpUtils/HEAD/img/img_a.png -------------------------------------------------------------------------------- /img/pic_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhoujiulong/FlutterHttpUtils/HEAD/img/pic_b.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhoujiulong/FlutterHttpUtils/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/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/zhoujiulong/FlutterHttpUtils/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /.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: 20e59316b8b8474554b38493b8ca888794b0234a 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - Flutter (from `.symlinks/flutter/ios`) 6 | 7 | EXTERNAL SOURCES: 8 | Flutter: 9 | :path: ".symlinks/flutter/ios" 10 | 11 | SPEC CHECKSUMS: 12 | Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a 13 | 14 | PODFILE CHECKSUM: b6a0a141693093b304368d08511b46cf3d1d0ac5 15 | 16 | COCOAPODS: 1.7.4 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/http_util/base_response.dart: -------------------------------------------------------------------------------- 1 | ///返回对象封装 2 | class BaseResponse { 3 | BaseResponse(this.code, this.message, this.result); 4 | 5 | //后台返回的错误码 6 | int code; 7 | //返回的信息 8 | String message; 9 | //返回的数据,需要自己进行处理成自己想要的对象 10 | Map result; 11 | 12 | BaseResponse.fromJson(Map json) 13 | : code = json["code"], 14 | message = json["message"], 15 | result = json["result"]; 16 | } 17 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutter_http_utils/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutter_http_utils 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/http_util/request_listener.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'base_response.dart'; 4 | 5 | ///网络请求监听 6 | class RequestListener { 7 | RequestListener({@required this.onSuccessListener, @required this.onErrorListener}); 8 | 9 | //请求成功 10 | final ValueChanged onSuccessListener; 11 | 12 | //请求失败 13 | final ValueChanged onErrorListener; 14 | 15 | void onSuccess(BaseResponse response) { 16 | if (onSuccessListener != null) onSuccessListener(response); 17 | } 18 | 19 | void onError(BaseResponse response) { 20 | if (onErrorListener != null) onErrorListener(response); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.2.71' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.2.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /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_http_utils/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/bloc/bloc_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | abstract class BlocBase { 4 | void dispose(); 5 | } 6 | 7 | ///简单封装,使用 StatefulWidget 主要是在 dispose 对资源进行释放 8 | class BlocProvider extends StatefulWidget { 9 | BlocProvider({ 10 | Key key, 11 | @required this.child, 12 | @required this.bloc, 13 | this.userDispose: true, 14 | }) : super(key: key); 15 | 16 | final T bloc; 17 | final Widget child; 18 | final bool userDispose; 19 | 20 | @override 21 | _BlocProviderState createState() => _BlocProviderState(); 22 | 23 | ///这个方法会从副控件的变量中进行查找,将最近的父控件中的 T 进行返回 24 | static T of(BuildContext context) { 25 | final type = _typeOf>(); 26 | BlocProvider provider = context.ancestorWidgetOfExactType(type); 27 | return provider.bloc; 28 | } 29 | 30 | static Type _typeOf() => T; 31 | } 32 | 33 | class _BlocProviderState extends State> { 34 | @override 35 | void dispose() { 36 | if (widget.userDispose) widget.bloc.dispose(); 37 | super.dispose(); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext context) { 42 | return widget.child; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/bloc/music_bloc.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_http_utils/bean/music.dart'; 2 | import 'package:flutter_http_utils/http_util/base_response.dart'; 3 | import 'package:flutter_http_utils/http_util/my_http_util.dart'; 4 | import 'package:flutter_http_utils/http_util/request_listener.dart'; 5 | import 'package:rxdart/rxdart.dart'; 6 | 7 | import 'bloc_provider.dart'; 8 | 9 | ///music 业务处理 10 | class MusicBloc implements BlocBase { 11 | 12 | BehaviorSubject _musicSubject = BehaviorSubject(); 13 | 14 | Sink get _musicSink => _musicSubject.sink; 15 | 16 | Stream get musicStream => _musicSubject.stream; 17 | 18 | //发送请求 19 | getMusic() { 20 | MyHttpUtil.instance.post( 21 | "musicBroadcastingDetails?channelname=public_tuijian_spring", 22 | RequestListener( 23 | onSuccessListener: (BaseResponse data) => _onResponseSuccess(data), 24 | onErrorListener: (BaseResponse errorData) => _onResponseError(errorData))); 25 | } 26 | 27 | //请求成功 28 | _onResponseSuccess(BaseResponse data) { 29 | Music bean = Music.fromJson(data.result); 30 | _musicSink.add(bean); 31 | } 32 | 33 | //请求失败 34 | _onResponseError(BaseResponse data) { 35 | _musicSink.add(null); 36 | } 37 | 38 | @override 39 | void dispose() { 40 | _musicSubject.close(); 41 | } 42 | 43 | } -------------------------------------------------------------------------------- /lib/bean/music.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'music.g.dart'; 4 | 5 | ///这个标注是告诉生成器,这个类是需要生成Model类的 6 | @JsonSerializable() 7 | class Music extends Object { 8 | Music( 9 | {this.channel, this.title, this.count, this.ch_name, this.artistid, this.avatar, this.channelid, this.songlist}); 10 | 11 | String channel; 12 | String title; 13 | int count; 14 | String ch_name; 15 | String artistid; 16 | String avatar; 17 | int channelid; 18 | List songlist; 19 | 20 | factory Music.fromJson(Map json) => _$MusicFromJson(json); 21 | 22 | Map toJson() => _$MusicToJson(this); 23 | } 24 | 25 | ///这个标注是告诉生成器,这个类是需要生成Model类的 26 | @JsonSerializable() 27 | class Song { 28 | Song( 29 | {this.all_rate, 30 | this.charge, 31 | this.method, 32 | this.artist, 33 | this.thumb, 34 | this.all_artist_id, 35 | this.resource_type, 36 | this.havehigh, 37 | this.title, 38 | this.songid, 39 | this.artist_id, 40 | this.flow}); 41 | 42 | String all_rate; 43 | int charge; 44 | int method; 45 | String artist; 46 | String thumb; 47 | String all_artist_id; 48 | String resource_type; 49 | int havehigh; 50 | String title; 51 | String songid; 52 | String artist_id; 53 | int flow; 54 | 55 | factory Song.fromJson(Map json) => _$SongFromJson(json); 56 | 57 | Map toJson() => _$SongToJson(this); 58 | } 59 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutter_http_utils 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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/ServiceDefinitions.json 65 | **/ios/Runner/GeneratedPluginRegistrant.* 66 | 67 | # Exceptions to above rules. 68 | !**/ios/**/default.mode1v3 69 | !**/ios/**/default.mode2v3 70 | !**/ios/**/default.pbxuser 71 | !**/ios/**/default.perspectivev3 72 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 73 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | 14 | 21 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.flutter_http_utils" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'androidx.test:runner:1.1.1' 66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' 67 | implementation 'com.android.support:support-v4:28.0.0' 68 | } 69 | -------------------------------------------------------------------------------- /lib/bean/music.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'music.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Music _$MusicFromJson(Map json) { 10 | return Music( 11 | channel: json['channel'] as String, 12 | title: json['title'] as String, 13 | count: json['count'] as int, 14 | ch_name: json['ch_name'] as String, 15 | artistid: json['artistid'] as String, 16 | avatar: json['avatar'] as String, 17 | channelid: json['channelid'] as int, 18 | songlist: (json['songlist'] as List) 19 | ?.map((e) => 20 | e == null ? null : Song.fromJson(e as Map)) 21 | ?.toList()); 22 | } 23 | 24 | Map _$MusicToJson(Music instance) => { 25 | 'channel': instance.channel, 26 | 'title': instance.title, 27 | 'count': instance.count, 28 | 'ch_name': instance.ch_name, 29 | 'artistid': instance.artistid, 30 | 'avatar': instance.avatar, 31 | 'channelid': instance.channelid, 32 | 'songlist': instance.songlist 33 | }; 34 | 35 | Song _$SongFromJson(Map json) { 36 | return Song( 37 | all_rate: json['all_rate'] as String, 38 | charge: json['charge'] as int, 39 | method: json['method'] as int, 40 | artist: json['artist'] as String, 41 | thumb: json['thumb'] as String, 42 | all_artist_id: json['all_artist_id'] as String, 43 | resource_type: json['resource_type'] as String, 44 | havehigh: json['havehigh'] as int, 45 | title: json['title'] as String, 46 | songid: json['songid'] as String, 47 | artist_id: json['artist_id'] as String, 48 | flow: json['flow'] as int); 49 | } 50 | 51 | Map _$SongToJson(Song instance) => { 52 | 'all_rate': instance.all_rate, 53 | 'charge': instance.charge, 54 | 'method': instance.method, 55 | 'artist': instance.artist, 56 | 'thumb': instance.thumb, 57 | 'all_artist_id': instance.all_artist_id, 58 | 'resource_type': instance.resource_type, 59 | 'havehigh': instance.havehigh, 60 | 'title': instance.title, 61 | 'songid': instance.songid, 62 | 'artist_id': instance.artist_id, 63 | 'flow': instance.flow 64 | }; 65 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | use_frameworks! 37 | 38 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 39 | # referring to absolute paths on developers' machines. 40 | system('rm -rf .symlinks') 41 | system('mkdir -p .symlinks/plugins') 42 | 43 | # Flutter Pods 44 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 45 | if generated_xcode_build_settings.empty? 46 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first." 47 | end 48 | generated_xcode_build_settings.map { |p| 49 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 50 | symlink = File.join('.symlinks', 'flutter') 51 | File.symlink(File.dirname(p[:path]), symlink) 52 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 53 | end 54 | } 55 | 56 | # Plugin Pods 57 | plugin_pods = parse_KV_file('../.flutter-plugins') 58 | plugin_pods.map { |p| 59 | symlink = File.join('.symlinks', 'plugins', p[:name]) 60 | File.symlink(p[:path], symlink) 61 | pod p[:name], :path => File.join(symlink, 'ios') 62 | } 63 | end 64 | 65 | # Prevent Cocoapods from embedding a second Flutter framework and causing an error with the new Xcode build system. 66 | install! 'cocoapods', :disable_input_output_paths => true 67 | 68 | post_install do |installer| 69 | installer.pods_project.targets.each do |target| 70 | target.build_configurations.each do |config| 71 | config.build_settings['ENABLE_BITCODE'] = 'NO' 72 | end 73 | end 74 | end 75 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 基于 dio 封装的网络请求框架 2 | ------------- 3 | ### 项目简介 4 | 项目中基本会用到网络请求,flutter 中有 dio 网络请求框架项目地址:https://github.com/flutterchina/dio, 5 | 而在实际开发中我们在请求的时候会添加一些头部信息和后台进行一些校验和一些公共信息的传递如版本号等,同时针对返回的 6 | 信息我们会定义一套数据结构模版如前后台协同定义的状态码,如区分token失效等,所以在开发中我们需要对网络框架进行进 7 | 一步的封装来达到统一处理类似切面编程的效果,同时对网络请求框架进行进一步封装之后也方便后期对网络请求框架的替换, 8 | 因为在实际的使用中我们是可以不引用网络框架代码的。 9 | 项目中添加来 bloc 框架的使用,使得页面和逻辑层相互独立,具体参考参考:https://www.jianshu.com/p/4d5e712594b4 10 | ### 使用方式 11 | 1、在项目中的 pubspec.yaml 文件中添加 dio: 2.1.13 的支持,如果不需要json序列化可不添加json_serializable相 12 | 关的库,依赖如下: 13 | dependencies: 14 | flutter: 15 | sdk: flutter 16 | 17 | cupertino_icons: ^0.1.2 18 | #网络请求库 19 | dio: 2.1.13 20 | #json序列化库 :json_serializable 21 | json_annotation: ^2.0.0 22 | #bloc 框架使用时用到,不用到 bloc 框架的可不添加 23 | rxdart: ^0.19.0 24 | 25 | dev_dependencies: 26 | flutter_test: 27 | sdk: flutter 28 | #json序列化库 :json_serializable 29 | build_runner: ^1.0.0 30 | #json序列化库 :json_serializable 31 | json_serializable: ^2.0.0 32 | 2、将本项目中 lib 下 http_util 包考进自己项目中 33 | 3、在需要使用的地方导入 MyHttpUtil.dart、BaseResponse.dart、RequestListener.dart文件 34 | 4、发送请求: 35 | //Post请求 36 | _sendPostRequest() { 37 | MyHttpUtil.instance.post( 38 | "musicBroadcastingDetails?channelname=public_tuijian_spring", 39 | RequestListener( 40 | onSuccessListener: (BaseResponse data) => _onResponseSuccess(data), 41 | onErrorListener: (BaseResponse errorData) => _onResponseError(errorData) 42 | ) 43 | ); 44 | } 45 | 46 | //Get请求 47 | _sendGetRequest() { 48 | MyHttpUtil.instance.get( 49 | "musicBroadcastingDetails?channelname=public_tuijian_spring", 50 | RequestListener( 51 | onSuccessListener: (BaseResponse data) => _onResponseSuccess(data), 52 | onErrorListener: (BaseResponse errorData) => _onResponseError(errorData) 53 | ) 54 | ); 55 | } 56 | 5、如果需要添加请求头、拦截器,修改一些参数,在MyHttpUtil.dart中进行修改,参考备注 57 | ### 友情提示 58 | 如果下载此项目在mac运行在ios设备上报 Podfile.lock 相关错误,尝试用终端进入到ios目录下执行 pod install 命令 59 | 习惯安卓开发的朋友可能习惯来安卓 json 解析的方式,在 flutter 开发时候对 flutter json 解析可能一下不是很适应, 60 | 因为 flutter json 解析需要额外做一些处理,可以参考下面这篇文章(在 Flutter 中解析复杂的 JSON) 61 | 当然flutter也有一些开源库是针对 json 解的,如 json_serializable package,具体使用方法参考下面这篇文章(使用 62 | 代码生成库序列化JSON),part 导入的时候名称要和文件名相同不然会运行 flutter packages pub run build_runner build 错误 63 | [在 Flutter 中解析复杂的 JSON](https://github.com/xitu/gold-miner/blob/master/TODO1/parsing-complex-json-in-flutter.md) 64 | [使用代码生成库序列化JSON](https://flutterchina.club/json/) 65 | ### demo 代码运行效果如下 66 | 67 | 68 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_http_utils/bean/music.dart'; 3 | 4 | import 'bloc/bloc_provider.dart'; 5 | import 'bloc/music_bloc.dart'; 6 | 7 | void main() => runApp(MyApp()); 8 | 9 | class MyApp extends StatelessWidget { 10 | @override 11 | Widget build(BuildContext context) { 12 | return BlocProvider( 13 | bloc: MusicBloc(), 14 | child: MaterialApp( 15 | title: 'Flutter Demo', 16 | theme: ThemeData( 17 | primarySwatch: Colors.blue, 18 | ), 19 | home: MyHomePage(), 20 | ), 21 | ); 22 | } 23 | } 24 | 25 | class MyHomePage extends StatelessWidget { 26 | @override 27 | Widget build(BuildContext context) { 28 | MusicBloc bloc = BlocProvider.of(context); 29 | 30 | return Scaffold( 31 | appBar: AppBar( 32 | title: Text("http util"), 33 | ), 34 | body: StreamBuilder( 35 | stream: bloc.musicStream, 36 | builder: (BuildContext context, AsyncSnapshot snapshot) { 37 | //如果数据为空则返回获取数据按钮 38 | if (snapshot.data == null) { 39 | return Center( 40 | child: FlatButton( 41 | onPressed: () { 42 | bloc.getMusic(); 43 | }, 44 | child: Text('点击获取网络数据'), 45 | color: Colors.green, 46 | ), 47 | ); 48 | } 49 | //列表显示返回的数据 50 | return ListView.builder( 51 | itemCount: snapshot.data.songlist.length, 52 | itemBuilder: (context, index) { 53 | return ListTile( 54 | title: _buildItem(snapshot.data.songlist[index]), 55 | ); 56 | }, 57 | ); 58 | }), 59 | ); 60 | } 61 | 62 | //创建 item 63 | Widget _buildItem(Song data) { 64 | if (data == null) data = Song(); 65 | String title = data.title != null ? data.title : "未知标题"; 66 | String artist = data.artist != null ? data.artist : "未知艺术家"; 67 | String imgSrc = data.thumb != null ? data.thumb : ""; 68 | 69 | return Row( 70 | mainAxisAlignment: MainAxisAlignment.start, 71 | crossAxisAlignment: CrossAxisAlignment.start, 72 | children: [ 73 | Container( 74 | width: 80, 75 | height: 80, 76 | child: Image.network( 77 | imgSrc, 78 | fit: BoxFit.fill, 79 | ), 80 | ), 81 | Padding( 82 | padding: EdgeInsets.only(left: 20), 83 | child: Column( 84 | mainAxisAlignment: MainAxisAlignment.start, 85 | crossAxisAlignment: CrossAxisAlignment.start, 86 | children: [ 87 | Text(title), 88 | Padding( 89 | padding: EdgeInsets.only(top: 20), 90 | child: Text(artist), 91 | ), 92 | ], 93 | ), 94 | ), 95 | ], 96 | ); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_http_utils 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.2.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 | dio: 2.1.13 27 | json_annotation: ^2.0.0 28 | rxdart: ^0.19.0 29 | 30 | dev_dependencies: 31 | flutter_test: 32 | sdk: flutter 33 | build_runner: ^1.0.0 34 | json_serializable: ^2.0.0 35 | 36 | 37 | # For information on the generic Dart part of this file, see the 38 | # following page: https://dart.dev/tools/pub/pubspec 39 | 40 | # The following section is specific to Flutter. 41 | flutter: 42 | 43 | # The following line ensures that the Material Icons font is 44 | # included with your application, so that you can use the icons in 45 | # the material Icons class. 46 | uses-material-design: true 47 | 48 | # To add assets to your application, add an assets section, like this: 49 | # assets: 50 | # - images/a_dot_burr.jpeg 51 | # - images/a_dot_ham.jpeg 52 | 53 | # An image asset can refer to one or more resolution-specific "variants", see 54 | # https://flutter.dev/assets-and-images/#resolution-aware. 55 | 56 | # For details regarding adding assets from package dependencies, see 57 | # https://flutter.dev/assets-and-images/#from-packages 58 | 59 | # To add custom fonts to your application, add a fonts section here, 60 | # in this "flutter" section. Each entry in this list should have a 61 | # "family" key with the font family name, and a "fonts" key with a 62 | # list giving the asset and other descriptors for the font. For 63 | # example: 64 | # fonts: 65 | # - family: Schyler 66 | # fonts: 67 | # - asset: fonts/Schyler-Regular.ttf 68 | # - asset: fonts/Schyler-Italic.ttf 69 | # style: italic 70 | # - family: Trajan Pro 71 | # fonts: 72 | # - asset: fonts/TrajanPro.ttf 73 | # - asset: fonts/TrajanPro_Bold.ttf 74 | # weight: 700 75 | # 76 | # For details regarding fonts from package dependencies, 77 | # see https://flutter.dev/custom-fonts/#from-packages 78 | -------------------------------------------------------------------------------- /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/http_util/my_http_util.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | import 'request_listener.dart'; 4 | import 'base_response.dart'; 5 | 6 | ///网络请求工具类,单例处理 7 | class MyHttpUtil { 8 | static const String _GET = "get"; 9 | static const String _POST = "post"; 10 | static const int _COMMON_REQUEST_ERROR = -1; 11 | 12 | Dio _dio; 13 | static MyHttpUtil _instance; 14 | 15 | static MyHttpUtil get instance => _getInstance(); 16 | 17 | factory MyHttpUtil() => _getInstance(); 18 | 19 | static MyHttpUtil _getInstance() { 20 | if (_instance == null) { 21 | _instance = MyHttpUtil._internal(); 22 | } 23 | return _instance; 24 | } 25 | 26 | ///初始化 27 | MyHttpUtil._internal() { 28 | _dio = Dio(BaseOptions( 29 | //项目域名,如果传的 url 是以 http 开头的会忽略此域名 30 | baseUrl: "https://api.apiopen.top/", 31 | //请求头 32 | headers: {'platform': 'android', 'version': 11.0}, 33 | connectTimeout: 10000, 34 | receiveTimeout: 20000, 35 | )); 36 | _addStartHttpInterceptor(_dio); //添加请求之前的拦截器 37 | } 38 | 39 | ///get请求 40 | ///如果 url 是以 http 开头的则忽略 baseUrl 41 | get(String url, RequestListener requestListener, {params}) async { 42 | _requestHttp(url, requestListener, _GET, params); 43 | } 44 | 45 | ///post请求 46 | ///如果 url 是以 http 开头的则忽略 baseUrl 47 | post(String url, RequestListener requestListener, {params}) async { 48 | _requestHttp(url, requestListener, _POST, params); 49 | } 50 | 51 | ///网络请求 52 | _requestHttp(String url, RequestListener requestListener, [String method, FormData params]) async { 53 | try { 54 | Response> response; 55 | if (method == _GET) { 56 | if (params != null && params.isNotEmpty) { 57 | response = await _dio.get>(url, queryParameters: params); 58 | } else { 59 | response = await _dio.get>(url); 60 | } 61 | } else if (method == _POST) { 62 | if (params != null && params.isNotEmpty) { 63 | response = await _dio.post>(url, queryParameters: params); 64 | } else { 65 | response = await _dio.post>(url); 66 | } 67 | } 68 | 69 | if (response.statusCode != 200) { 70 | requestListener.onError(BaseResponse(response.statusCode, "请求失败", Map())); 71 | return; 72 | } 73 | 74 | //将返回的数据解析成定义的类,方便操作 75 | BaseResponse baseResponse = BaseResponse.fromJson(response.data); 76 | if (baseResponse.result == null) baseResponse.result = Map(); 77 | //根据返回的状态进行处理,如需要添加 token 失效处理 78 | if (baseResponse.code == 200) { 79 | requestListener.onSuccess(baseResponse); 80 | } else { 81 | requestListener.onError(baseResponse); 82 | } 83 | } catch (exception) { 84 | requestListener.onError(BaseResponse(_COMMON_REQUEST_ERROR, "请求失败", Map())); 85 | } 86 | } 87 | 88 | ///拦截处理 89 | _addStartHttpInterceptor(Dio dio) { 90 | dio.interceptors.add(InterceptorsWrapper(onRequest: (RequestOptions options) { 91 | // 在请求被发送之前做一些事情 92 | return options; 93 | }, onResponse: (Response response) { 94 | // 在返回响应数据之前做一些预处理 95 | return response; 96 | }, onError: (DioError e) { 97 | // 当请求失败时做一些预处理 98 | return e; 99 | })); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/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.36.4" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.flutter-io.cn" 16 | source: hosted 17 | version: "1.5.2" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.flutter-io.cn" 23 | source: hosted 24 | version: "2.2.0" 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.5" 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.4.1+1" 46 | build_daemon: 47 | dependency: transitive 48 | description: 49 | name: build_daemon 50 | url: "https://pub.flutter-io.cn" 51 | source: hosted 52 | version: "2.0.0" 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.6" 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.6.5" 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: "3.0.9" 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.2.2" 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.7.0" 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 | checked_yaml: 96 | dependency: transitive 97 | description: 98 | name: checked_yaml 99 | url: "https://pub.flutter-io.cn" 100 | source: hosted 101 | version: "1.0.2" 102 | code_builder: 103 | dependency: transitive 104 | description: 105 | name: code_builder 106 | url: "https://pub.flutter-io.cn" 107 | source: hosted 108 | version: "3.2.0" 109 | collection: 110 | dependency: transitive 111 | description: 112 | name: collection 113 | url: "https://pub.flutter-io.cn" 114 | source: hosted 115 | version: "1.14.11" 116 | convert: 117 | dependency: transitive 118 | description: 119 | name: convert 120 | url: "https://pub.flutter-io.cn" 121 | source: hosted 122 | version: "2.1.1" 123 | cookie_jar: 124 | dependency: transitive 125 | description: 126 | name: cookie_jar 127 | url: "https://pub.flutter-io.cn" 128 | source: hosted 129 | version: "1.0.1" 130 | crypto: 131 | dependency: transitive 132 | description: 133 | name: crypto 134 | url: "https://pub.flutter-io.cn" 135 | source: hosted 136 | version: "2.1.1+1" 137 | csslib: 138 | dependency: transitive 139 | description: 140 | name: csslib 141 | url: "https://pub.flutter-io.cn" 142 | source: hosted 143 | version: "0.16.1" 144 | cupertino_icons: 145 | dependency: "direct main" 146 | description: 147 | name: cupertino_icons 148 | url: "https://pub.flutter-io.cn" 149 | source: hosted 150 | version: "0.1.2" 151 | dart_style: 152 | dependency: transitive 153 | description: 154 | name: dart_style 155 | url: "https://pub.flutter-io.cn" 156 | source: hosted 157 | version: "1.2.9" 158 | dio: 159 | dependency: "direct main" 160 | description: 161 | name: dio 162 | url: "https://pub.flutter-io.cn" 163 | source: hosted 164 | version: "2.1.13" 165 | fixnum: 166 | dependency: transitive 167 | description: 168 | name: fixnum 169 | url: "https://pub.flutter-io.cn" 170 | source: hosted 171 | version: "0.10.9" 172 | flutter: 173 | dependency: "direct main" 174 | description: flutter 175 | source: sdk 176 | version: "0.0.0" 177 | flutter_test: 178 | dependency: "direct dev" 179 | description: flutter 180 | source: sdk 181 | version: "0.0.0" 182 | front_end: 183 | dependency: transitive 184 | description: 185 | name: front_end 186 | url: "https://pub.flutter-io.cn" 187 | source: hosted 188 | version: "0.1.19" 189 | glob: 190 | dependency: transitive 191 | description: 192 | name: glob 193 | url: "https://pub.flutter-io.cn" 194 | source: hosted 195 | version: "1.1.7" 196 | graphs: 197 | dependency: transitive 198 | description: 199 | name: graphs 200 | url: "https://pub.flutter-io.cn" 201 | source: hosted 202 | version: "0.2.0" 203 | html: 204 | dependency: transitive 205 | description: 206 | name: html 207 | url: "https://pub.flutter-io.cn" 208 | source: hosted 209 | version: "0.14.0+2" 210 | http: 211 | dependency: transitive 212 | description: 213 | name: http 214 | url: "https://pub.flutter-io.cn" 215 | source: hosted 216 | version: "0.12.0+2" 217 | http_multi_server: 218 | dependency: transitive 219 | description: 220 | name: http_multi_server 221 | url: "https://pub.flutter-io.cn" 222 | source: hosted 223 | version: "2.1.0" 224 | http_parser: 225 | dependency: transitive 226 | description: 227 | name: http_parser 228 | url: "https://pub.flutter-io.cn" 229 | source: hosted 230 | version: "3.1.3" 231 | io: 232 | dependency: transitive 233 | description: 234 | name: io 235 | url: "https://pub.flutter-io.cn" 236 | source: hosted 237 | version: "0.3.3" 238 | js: 239 | dependency: transitive 240 | description: 241 | name: js 242 | url: "https://pub.flutter-io.cn" 243 | source: hosted 244 | version: "0.6.1+1" 245 | json_annotation: 246 | dependency: "direct main" 247 | description: 248 | name: json_annotation 249 | url: "https://pub.flutter-io.cn" 250 | source: hosted 251 | version: "2.3.0" 252 | json_serializable: 253 | dependency: "direct dev" 254 | description: 255 | name: json_serializable 256 | url: "https://pub.flutter-io.cn" 257 | source: hosted 258 | version: "2.3.0" 259 | kernel: 260 | dependency: transitive 261 | description: 262 | name: kernel 263 | url: "https://pub.flutter-io.cn" 264 | source: hosted 265 | version: "0.3.19" 266 | logging: 267 | dependency: transitive 268 | description: 269 | name: logging 270 | url: "https://pub.flutter-io.cn" 271 | source: hosted 272 | version: "0.11.3+2" 273 | matcher: 274 | dependency: transitive 275 | description: 276 | name: matcher 277 | url: "https://pub.flutter-io.cn" 278 | source: hosted 279 | version: "0.12.5" 280 | meta: 281 | dependency: transitive 282 | description: 283 | name: meta 284 | url: "https://pub.flutter-io.cn" 285 | source: hosted 286 | version: "1.1.6" 287 | mime: 288 | dependency: transitive 289 | description: 290 | name: mime 291 | url: "https://pub.flutter-io.cn" 292 | source: hosted 293 | version: "0.9.6+3" 294 | package_config: 295 | dependency: transitive 296 | description: 297 | name: package_config 298 | url: "https://pub.flutter-io.cn" 299 | source: hosted 300 | version: "1.0.5" 301 | package_resolver: 302 | dependency: transitive 303 | description: 304 | name: package_resolver 305 | url: "https://pub.flutter-io.cn" 306 | source: hosted 307 | version: "1.0.10" 308 | path: 309 | dependency: transitive 310 | description: 311 | name: path 312 | url: "https://pub.flutter-io.cn" 313 | source: hosted 314 | version: "1.6.2" 315 | pedantic: 316 | dependency: transitive 317 | description: 318 | name: pedantic 319 | url: "https://pub.flutter-io.cn" 320 | source: hosted 321 | version: "1.7.0" 322 | pool: 323 | dependency: transitive 324 | description: 325 | name: pool 326 | url: "https://pub.flutter-io.cn" 327 | source: hosted 328 | version: "1.4.0" 329 | pub_semver: 330 | dependency: transitive 331 | description: 332 | name: pub_semver 333 | url: "https://pub.flutter-io.cn" 334 | source: hosted 335 | version: "1.4.2" 336 | pubspec_parse: 337 | dependency: transitive 338 | description: 339 | name: pubspec_parse 340 | url: "https://pub.flutter-io.cn" 341 | source: hosted 342 | version: "0.1.5" 343 | quiver: 344 | dependency: transitive 345 | description: 346 | name: quiver 347 | url: "https://pub.flutter-io.cn" 348 | source: hosted 349 | version: "2.0.3" 350 | rxdart: 351 | dependency: "direct main" 352 | description: 353 | name: rxdart 354 | url: "https://pub.flutter-io.cn" 355 | source: hosted 356 | version: "0.19.0" 357 | shelf: 358 | dependency: transitive 359 | description: 360 | name: shelf 361 | url: "https://pub.flutter-io.cn" 362 | source: hosted 363 | version: "0.7.5" 364 | shelf_web_socket: 365 | dependency: transitive 366 | description: 367 | name: shelf_web_socket 368 | url: "https://pub.flutter-io.cn" 369 | source: hosted 370 | version: "0.2.3" 371 | sky_engine: 372 | dependency: transitive 373 | description: flutter 374 | source: sdk 375 | version: "0.0.99" 376 | source_gen: 377 | dependency: transitive 378 | description: 379 | name: source_gen 380 | url: "https://pub.flutter-io.cn" 381 | source: hosted 382 | version: "0.9.4+3" 383 | source_span: 384 | dependency: transitive 385 | description: 386 | name: source_span 387 | url: "https://pub.flutter-io.cn" 388 | source: hosted 389 | version: "1.5.5" 390 | stack_trace: 391 | dependency: transitive 392 | description: 393 | name: stack_trace 394 | url: "https://pub.flutter-io.cn" 395 | source: hosted 396 | version: "1.9.3" 397 | stream_channel: 398 | dependency: transitive 399 | description: 400 | name: stream_channel 401 | url: "https://pub.flutter-io.cn" 402 | source: hosted 403 | version: "2.0.0" 404 | stream_transform: 405 | dependency: transitive 406 | description: 407 | name: stream_transform 408 | url: "https://pub.flutter-io.cn" 409 | source: hosted 410 | version: "0.0.19" 411 | string_scanner: 412 | dependency: transitive 413 | description: 414 | name: string_scanner 415 | url: "https://pub.flutter-io.cn" 416 | source: hosted 417 | version: "1.0.4" 418 | term_glyph: 419 | dependency: transitive 420 | description: 421 | name: term_glyph 422 | url: "https://pub.flutter-io.cn" 423 | source: hosted 424 | version: "1.1.0" 425 | test_api: 426 | dependency: transitive 427 | description: 428 | name: test_api 429 | url: "https://pub.flutter-io.cn" 430 | source: hosted 431 | version: "0.2.5" 432 | timing: 433 | dependency: transitive 434 | description: 435 | name: timing 436 | url: "https://pub.flutter-io.cn" 437 | source: hosted 438 | version: "0.1.1+2" 439 | typed_data: 440 | dependency: transitive 441 | description: 442 | name: typed_data 443 | url: "https://pub.flutter-io.cn" 444 | source: hosted 445 | version: "1.1.6" 446 | vector_math: 447 | dependency: transitive 448 | description: 449 | name: vector_math 450 | url: "https://pub.flutter-io.cn" 451 | source: hosted 452 | version: "2.0.8" 453 | watcher: 454 | dependency: transitive 455 | description: 456 | name: watcher 457 | url: "https://pub.flutter-io.cn" 458 | source: hosted 459 | version: "0.9.7+12" 460 | web_socket_channel: 461 | dependency: transitive 462 | description: 463 | name: web_socket_channel 464 | url: "https://pub.flutter-io.cn" 465 | source: hosted 466 | version: "1.0.15" 467 | yaml: 468 | dependency: transitive 469 | description: 470 | name: yaml 471 | url: "https://pub.flutter-io.cn" 472 | source: hosted 473 | version: "2.1.16" 474 | sdks: 475 | dart: ">=2.3.0 <3.0.0" 476 | -------------------------------------------------------------------------------- /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 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 21 | BF9A7AB9F73CE106AC2B1563 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A97F5861F021ACAABFAF4618 /* Pods_Runner.framework */; }; 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 | 025EDBA9A450F24FD6D1FF5C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 41 | 12484111793D8E51B3B1A281 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 46 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 47 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 48 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 49 | 7FC623B11364AC031C9CCCB3 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | A97F5861F021ACAABFAF4618 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | /* End PBXFileReference section */ 60 | 61 | /* Begin PBXFrameworksBuildPhase section */ 62 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 67 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 68 | BF9A7AB9F73CE106AC2B1563 /* Pods_Runner.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | /* End PBXFrameworksBuildPhase section */ 73 | 74 | /* Begin PBXGroup section */ 75 | 9740EEB11CF90186004384FC /* Flutter */ = { 76 | isa = PBXGroup; 77 | children = ( 78 | 3B80C3931E831B6300D905FE /* App.framework */, 79 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 80 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 81 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 82 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 83 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 84 | ); 85 | name = Flutter; 86 | sourceTree = ""; 87 | }; 88 | 97C146E51CF9000F007C117D = { 89 | isa = PBXGroup; 90 | children = ( 91 | 9740EEB11CF90186004384FC /* Flutter */, 92 | 97C146F01CF9000F007C117D /* Runner */, 93 | 97C146EF1CF9000F007C117D /* Products */, 94 | CDFA90032ED7A1D453EC032D /* Pods */, 95 | AB53848079AD3721A00BD613 /* Frameworks */, 96 | ); 97 | sourceTree = ""; 98 | }; 99 | 97C146EF1CF9000F007C117D /* Products */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 97C146EE1CF9000F007C117D /* Runner.app */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | 97C146F01CF9000F007C117D /* Runner */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 111 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 112 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 113 | 97C147021CF9000F007C117D /* Info.plist */, 114 | 97C146F11CF9000F007C117D /* Supporting Files */, 115 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 116 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 117 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 118 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 119 | ); 120 | path = Runner; 121 | sourceTree = ""; 122 | }; 123 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | AB53848079AD3721A00BD613 /* Frameworks */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | A97F5861F021ACAABFAF4618 /* Pods_Runner.framework */, 134 | ); 135 | name = Frameworks; 136 | sourceTree = ""; 137 | }; 138 | CDFA90032ED7A1D453EC032D /* Pods */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | 12484111793D8E51B3B1A281 /* Pods-Runner.debug.xcconfig */, 142 | 025EDBA9A450F24FD6D1FF5C /* Pods-Runner.release.xcconfig */, 143 | 7FC623B11364AC031C9CCCB3 /* Pods-Runner.profile.xcconfig */, 144 | ); 145 | name = Pods; 146 | path = Pods; 147 | sourceTree = ""; 148 | }; 149 | /* End PBXGroup section */ 150 | 151 | /* Begin PBXNativeTarget section */ 152 | 97C146ED1CF9000F007C117D /* Runner */ = { 153 | isa = PBXNativeTarget; 154 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 155 | buildPhases = ( 156 | 949A3ACCEB33785A3DAF1DC9 /* [CP] Check Pods Manifest.lock */, 157 | 9740EEB61CF901F6004384FC /* Run Script */, 158 | 97C146EA1CF9000F007C117D /* Sources */, 159 | 97C146EB1CF9000F007C117D /* Frameworks */, 160 | 97C146EC1CF9000F007C117D /* Resources */, 161 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 162 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 163 | 7341679F09637D6E0F56BCE2 /* [CP] Embed Pods Frameworks */, 164 | ); 165 | buildRules = ( 166 | ); 167 | dependencies = ( 168 | ); 169 | name = Runner; 170 | productName = Runner; 171 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 172 | productType = "com.apple.product-type.application"; 173 | }; 174 | /* End PBXNativeTarget section */ 175 | 176 | /* Begin PBXProject section */ 177 | 97C146E61CF9000F007C117D /* Project object */ = { 178 | isa = PBXProject; 179 | attributes = { 180 | LastUpgradeCheck = 1020; 181 | ORGANIZATIONNAME = "The Chromium Authors"; 182 | TargetAttributes = { 183 | 97C146ED1CF9000F007C117D = { 184 | CreatedOnToolsVersion = 7.3.1; 185 | LastSwiftMigration = 0910; 186 | }; 187 | }; 188 | }; 189 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 190 | compatibilityVersion = "Xcode 3.2"; 191 | developmentRegion = en; 192 | hasScannedForEncodings = 0; 193 | knownRegions = ( 194 | en, 195 | Base, 196 | ); 197 | mainGroup = 97C146E51CF9000F007C117D; 198 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 199 | projectDirPath = ""; 200 | projectRoot = ""; 201 | targets = ( 202 | 97C146ED1CF9000F007C117D /* Runner */, 203 | ); 204 | }; 205 | /* End PBXProject section */ 206 | 207 | /* Begin PBXResourcesBuildPhase section */ 208 | 97C146EC1CF9000F007C117D /* Resources */ = { 209 | isa = PBXResourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 213 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 214 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 215 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 216 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXResourcesBuildPhase section */ 221 | 222 | /* Begin PBXShellScriptBuildPhase section */ 223 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 224 | isa = PBXShellScriptBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | ); 228 | inputPaths = ( 229 | ); 230 | name = "Thin Binary"; 231 | outputPaths = ( 232 | ); 233 | runOnlyForDeploymentPostprocessing = 0; 234 | shellPath = /bin/sh; 235 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 236 | }; 237 | 7341679F09637D6E0F56BCE2 /* [CP] Embed Pods Frameworks */ = { 238 | isa = PBXShellScriptBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | ); 242 | inputPaths = ( 243 | ); 244 | name = "[CP] Embed Pods Frameworks"; 245 | outputPaths = ( 246 | ); 247 | runOnlyForDeploymentPostprocessing = 0; 248 | shellPath = /bin/sh; 249 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 250 | showEnvVarsInLog = 0; 251 | }; 252 | 949A3ACCEB33785A3DAF1DC9 /* [CP] Check Pods Manifest.lock */ = { 253 | isa = PBXShellScriptBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | ); 257 | inputFileListPaths = ( 258 | ); 259 | inputPaths = ( 260 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 261 | "${PODS_ROOT}/Manifest.lock", 262 | ); 263 | name = "[CP] Check Pods Manifest.lock"; 264 | outputFileListPaths = ( 265 | ); 266 | outputPaths = ( 267 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | shellPath = /bin/sh; 271 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 272 | showEnvVarsInLog = 0; 273 | }; 274 | 9740EEB61CF901F6004384FC /* Run Script */ = { 275 | isa = PBXShellScriptBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | ); 279 | inputPaths = ( 280 | ); 281 | name = "Run Script"; 282 | outputPaths = ( 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | shellPath = /bin/sh; 286 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 287 | }; 288 | /* End PBXShellScriptBuildPhase section */ 289 | 290 | /* Begin PBXSourcesBuildPhase section */ 291 | 97C146EA1CF9000F007C117D /* Sources */ = { 292 | isa = PBXSourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 296 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 297 | ); 298 | runOnlyForDeploymentPostprocessing = 0; 299 | }; 300 | /* End PBXSourcesBuildPhase section */ 301 | 302 | /* Begin PBXVariantGroup section */ 303 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 304 | isa = PBXVariantGroup; 305 | children = ( 306 | 97C146FB1CF9000F007C117D /* Base */, 307 | ); 308 | name = Main.storyboard; 309 | sourceTree = ""; 310 | }; 311 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 312 | isa = PBXVariantGroup; 313 | children = ( 314 | 97C147001CF9000F007C117D /* Base */, 315 | ); 316 | name = LaunchScreen.storyboard; 317 | sourceTree = ""; 318 | }; 319 | /* End PBXVariantGroup section */ 320 | 321 | /* Begin XCBuildConfiguration section */ 322 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 323 | isa = XCBuildConfiguration; 324 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 325 | buildSettings = { 326 | ALWAYS_SEARCH_USER_PATHS = NO; 327 | CLANG_ANALYZER_NONNULL = YES; 328 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 329 | CLANG_CXX_LIBRARY = "libc++"; 330 | CLANG_ENABLE_MODULES = YES; 331 | CLANG_ENABLE_OBJC_ARC = YES; 332 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 333 | CLANG_WARN_BOOL_CONVERSION = YES; 334 | CLANG_WARN_COMMA = YES; 335 | CLANG_WARN_CONSTANT_CONVERSION = YES; 336 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 337 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 338 | CLANG_WARN_EMPTY_BODY = YES; 339 | CLANG_WARN_ENUM_CONVERSION = YES; 340 | CLANG_WARN_INFINITE_RECURSION = YES; 341 | CLANG_WARN_INT_CONVERSION = YES; 342 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 343 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 344 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 345 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 346 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 347 | CLANG_WARN_STRICT_PROTOTYPES = YES; 348 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 349 | CLANG_WARN_UNREACHABLE_CODE = YES; 350 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 351 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 352 | COPY_PHASE_STRIP = NO; 353 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 354 | ENABLE_NS_ASSERTIONS = NO; 355 | ENABLE_STRICT_OBJC_MSGSEND = YES; 356 | GCC_C_LANGUAGE_STANDARD = gnu99; 357 | GCC_NO_COMMON_BLOCKS = YES; 358 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 359 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 360 | GCC_WARN_UNDECLARED_SELECTOR = YES; 361 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 362 | GCC_WARN_UNUSED_FUNCTION = YES; 363 | GCC_WARN_UNUSED_VARIABLE = YES; 364 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 365 | MTL_ENABLE_DEBUG_INFO = NO; 366 | SDKROOT = iphoneos; 367 | TARGETED_DEVICE_FAMILY = "1,2"; 368 | VALIDATE_PRODUCT = YES; 369 | }; 370 | name = Profile; 371 | }; 372 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 373 | isa = XCBuildConfiguration; 374 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 375 | buildSettings = { 376 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 377 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 378 | DEVELOPMENT_TEAM = S8QB4VV633; 379 | ENABLE_BITCODE = NO; 380 | FRAMEWORK_SEARCH_PATHS = ( 381 | "$(inherited)", 382 | "$(PROJECT_DIR)/Flutter", 383 | ); 384 | INFOPLIST_FILE = Runner/Info.plist; 385 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 386 | LIBRARY_SEARCH_PATHS = ( 387 | "$(inherited)", 388 | "$(PROJECT_DIR)/Flutter", 389 | ); 390 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpUtils; 391 | PRODUCT_NAME = "$(TARGET_NAME)"; 392 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 393 | SWIFT_VERSION = 4.0; 394 | VERSIONING_SYSTEM = "apple-generic"; 395 | }; 396 | name = Profile; 397 | }; 398 | 97C147031CF9000F007C117D /* Debug */ = { 399 | isa = XCBuildConfiguration; 400 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 401 | buildSettings = { 402 | ALWAYS_SEARCH_USER_PATHS = NO; 403 | CLANG_ANALYZER_NONNULL = YES; 404 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 405 | CLANG_CXX_LIBRARY = "libc++"; 406 | CLANG_ENABLE_MODULES = YES; 407 | CLANG_ENABLE_OBJC_ARC = YES; 408 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 409 | CLANG_WARN_BOOL_CONVERSION = YES; 410 | CLANG_WARN_COMMA = YES; 411 | CLANG_WARN_CONSTANT_CONVERSION = YES; 412 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 413 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 414 | CLANG_WARN_EMPTY_BODY = YES; 415 | CLANG_WARN_ENUM_CONVERSION = YES; 416 | CLANG_WARN_INFINITE_RECURSION = YES; 417 | CLANG_WARN_INT_CONVERSION = YES; 418 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 419 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 420 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 421 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 422 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 423 | CLANG_WARN_STRICT_PROTOTYPES = YES; 424 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 425 | CLANG_WARN_UNREACHABLE_CODE = YES; 426 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 427 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 428 | COPY_PHASE_STRIP = NO; 429 | DEBUG_INFORMATION_FORMAT = dwarf; 430 | ENABLE_STRICT_OBJC_MSGSEND = YES; 431 | ENABLE_TESTABILITY = YES; 432 | GCC_C_LANGUAGE_STANDARD = gnu99; 433 | GCC_DYNAMIC_NO_PIC = NO; 434 | GCC_NO_COMMON_BLOCKS = YES; 435 | GCC_OPTIMIZATION_LEVEL = 0; 436 | GCC_PREPROCESSOR_DEFINITIONS = ( 437 | "DEBUG=1", 438 | "$(inherited)", 439 | ); 440 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 441 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 442 | GCC_WARN_UNDECLARED_SELECTOR = YES; 443 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 444 | GCC_WARN_UNUSED_FUNCTION = YES; 445 | GCC_WARN_UNUSED_VARIABLE = YES; 446 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 447 | MTL_ENABLE_DEBUG_INFO = YES; 448 | ONLY_ACTIVE_ARCH = YES; 449 | SDKROOT = iphoneos; 450 | TARGETED_DEVICE_FAMILY = "1,2"; 451 | }; 452 | name = Debug; 453 | }; 454 | 97C147041CF9000F007C117D /* Release */ = { 455 | isa = XCBuildConfiguration; 456 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 457 | buildSettings = { 458 | ALWAYS_SEARCH_USER_PATHS = NO; 459 | CLANG_ANALYZER_NONNULL = YES; 460 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 461 | CLANG_CXX_LIBRARY = "libc++"; 462 | CLANG_ENABLE_MODULES = YES; 463 | CLANG_ENABLE_OBJC_ARC = YES; 464 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 465 | CLANG_WARN_BOOL_CONVERSION = YES; 466 | CLANG_WARN_COMMA = YES; 467 | CLANG_WARN_CONSTANT_CONVERSION = YES; 468 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 469 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 470 | CLANG_WARN_EMPTY_BODY = YES; 471 | CLANG_WARN_ENUM_CONVERSION = YES; 472 | CLANG_WARN_INFINITE_RECURSION = YES; 473 | CLANG_WARN_INT_CONVERSION = YES; 474 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 475 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 476 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 477 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 478 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 479 | CLANG_WARN_STRICT_PROTOTYPES = YES; 480 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 481 | CLANG_WARN_UNREACHABLE_CODE = YES; 482 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 483 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 484 | COPY_PHASE_STRIP = NO; 485 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 486 | ENABLE_NS_ASSERTIONS = NO; 487 | ENABLE_STRICT_OBJC_MSGSEND = YES; 488 | GCC_C_LANGUAGE_STANDARD = gnu99; 489 | GCC_NO_COMMON_BLOCKS = YES; 490 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 491 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 492 | GCC_WARN_UNDECLARED_SELECTOR = YES; 493 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 494 | GCC_WARN_UNUSED_FUNCTION = YES; 495 | GCC_WARN_UNUSED_VARIABLE = YES; 496 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 497 | MTL_ENABLE_DEBUG_INFO = NO; 498 | SDKROOT = iphoneos; 499 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 500 | TARGETED_DEVICE_FAMILY = "1,2"; 501 | VALIDATE_PRODUCT = YES; 502 | }; 503 | name = Release; 504 | }; 505 | 97C147061CF9000F007C117D /* Debug */ = { 506 | isa = XCBuildConfiguration; 507 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 508 | buildSettings = { 509 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 510 | CLANG_ENABLE_MODULES = YES; 511 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 512 | ENABLE_BITCODE = NO; 513 | FRAMEWORK_SEARCH_PATHS = ( 514 | "$(inherited)", 515 | "$(PROJECT_DIR)/Flutter", 516 | ); 517 | INFOPLIST_FILE = Runner/Info.plist; 518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 519 | LIBRARY_SEARCH_PATHS = ( 520 | "$(inherited)", 521 | "$(PROJECT_DIR)/Flutter", 522 | ); 523 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpUtils; 524 | PRODUCT_NAME = "$(TARGET_NAME)"; 525 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 526 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 527 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 528 | SWIFT_VERSION = 4.0; 529 | VERSIONING_SYSTEM = "apple-generic"; 530 | }; 531 | name = Debug; 532 | }; 533 | 97C147071CF9000F007C117D /* Release */ = { 534 | isa = XCBuildConfiguration; 535 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 536 | buildSettings = { 537 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 538 | CLANG_ENABLE_MODULES = YES; 539 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 540 | ENABLE_BITCODE = NO; 541 | FRAMEWORK_SEARCH_PATHS = ( 542 | "$(inherited)", 543 | "$(PROJECT_DIR)/Flutter", 544 | ); 545 | INFOPLIST_FILE = Runner/Info.plist; 546 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 547 | LIBRARY_SEARCH_PATHS = ( 548 | "$(inherited)", 549 | "$(PROJECT_DIR)/Flutter", 550 | ); 551 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterHttpUtils; 552 | PRODUCT_NAME = "$(TARGET_NAME)"; 553 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 554 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 555 | SWIFT_VERSION = 4.0; 556 | VERSIONING_SYSTEM = "apple-generic"; 557 | }; 558 | name = Release; 559 | }; 560 | /* End XCBuildConfiguration section */ 561 | 562 | /* Begin XCConfigurationList section */ 563 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 564 | isa = XCConfigurationList; 565 | buildConfigurations = ( 566 | 97C147031CF9000F007C117D /* Debug */, 567 | 97C147041CF9000F007C117D /* Release */, 568 | 249021D3217E4FDB00AE95B9 /* Profile */, 569 | ); 570 | defaultConfigurationIsVisible = 0; 571 | defaultConfigurationName = Release; 572 | }; 573 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 574 | isa = XCConfigurationList; 575 | buildConfigurations = ( 576 | 97C147061CF9000F007C117D /* Debug */, 577 | 97C147071CF9000F007C117D /* Release */, 578 | 249021D4217E4FDB00AE95B9 /* Profile */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | /* End XCConfigurationList section */ 584 | }; 585 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 586 | } 587 | --------------------------------------------------------------------------------