Commit b6798a3e authored by 林生雨's avatar 林生雨

Commit

parent 39d8bf42
#Thu Aug 08 10:34:21 CST 2019 #Fri Aug 09 14:55:50 CST 2019
gradle.version=4.10.2 gradle.version=4.10.2
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id=":flutter" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/../../.." external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":flutter" />
</configuration>
</facet>
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="debug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" />
<afterSyncTasks>
<task>generateDebugSources</task>
</afterSyncTasks>
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/build/generated/res/resValues/debug" />
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
<option name="PROJECT_TYPE" value="1" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes" />
<output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/compileDebugAidl/out" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/compileDebugRenderscript/out" isTestSource="false" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/compileDebugAndroidTestAidl/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debugAndroidTest/compileDebugAndroidTestRenderscript/out" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/generated/not_namespaced_r_class_sources" />
<excludeFolder url="file://$MODULE_DIR$/build/generated/source/r" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/aapt_friendly_merged_manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotation_processor_list" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations_typedef_file" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/annotations_zip" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check-manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check_manifest_result" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compile_library_classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/compile_only_not_namespaced_r_class_jar" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/consumer_proguard_file" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/flutter" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/full_jar" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/intermediate-jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/javac" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_and_local_jars_jni" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_java_res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/library_manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/lint_jar" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_jni_libs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/merged_shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged-classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/packaged_res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/public_res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/res" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/rs" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/runtime_library_classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shader_assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/shaders" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/tmp" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/transforms" />
<excludeFolder url="file://$MODULE_DIR$/build/outputs" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Gradle: com.android.support:support-fragment:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:localbroadcastmanager:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:documentfile:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:/Users/apple/Downloads/flutter/bin/cache/artifacts/engine/android-arm64/flutter.jar:unspecified@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:slidingpanelayout:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:viewmodel:1.1.1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:loader:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:runtime:1.1.1@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core:1.1.1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:collections:28.0.0@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:cursoradapter:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.1.1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-compat:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-ui:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:asynclayoutinflater:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:print:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.core:common:1.1.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:versionedparcelable:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: __local_aars__:/Users/apple/lsy/gengmei_alpha/gmalpha_flutter/.android/Flutter/build/intermediates/flutter/debug/libs.jar:unspecified@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: junit:junit:4.12@jar" level="project" />
<orderEntry type="library" scope="TEST" name="Gradle: org.hamcrest:hamcrest-core:1.3@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:viewpager:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-core-utils:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-annotations:28.0.0@jar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.1@jar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-v13:27.1.1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:interpolator:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata:1.1.1@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:drawerlayout:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:coordinatorlayout:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:customview:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:swiperefreshlayout:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-v4:28.0.0@aar" level="project" />
<orderEntry type="library" name="Gradle: com.android.support:support-media-compat:28.0.0@aar" level="project" />
<orderEntry type="module" module-name="flutter_boost" />
<orderEntry type="module" module-name="shared_preferences" />
<orderEntry type="module" module-name="sqflite" />
<orderEntry type="module" module-name="xservice_kit" />
<orderEntry type="module" module-name="path_provider" />
</component>
</module>
\ No newline at end of file
...@@ -35,9 +35,9 @@ buildDir = new File(rootProject.projectDir, "../build/host") ...@@ -35,9 +35,9 @@ buildDir = new File(rootProject.projectDir, "../build/host")
dependencies { dependencies {
implementation project(':flutter') implementation project(':flutter')
implementation fileTree(dir: 'libs', include: ['*.jar']) implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2' implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:28.0.0' implementation 'com.android.support:design:27.1.1'
androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
......
Flutter crash report; please file at https://github.com/flutter/flutter/issues.
## command
flutter --no-color run --machine --track-widget-creation --device-id=emulator-5554 lib/main.dart
## exception
SocketException: SocketException: Write failed (OS Error: Broken pipe, errno = 32), port = 0
```
null```
## flutter doctor
```
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Mac OS X 10.14.5 18F132, locale zh-Hans-CN)
• Flutter version 1.7.8+hotfix.4 at /Users/apple/Downloads/flutter
• Framework revision 20e59316b8 (3 weeks ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/apple/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• ANDROID_HOME = /Users/apple/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• CocoaPods version 1.7.4
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 37.0.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
! Doctor found issues in 1 category.
```
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gmalpha_flutter/base/user_tool.dart'; import 'package:gmalpha_flutter/base/user_tool.dart';
import 'package:gmalpha_flutter/model/setting_model.dart';
import 'package:provider/provider.dart';
import 'package:rxdart/rxdart.dart';
import 'package:shared_preferences/shared_preferences.dart';
class AppConfig { class AppConfig<T extends ChangeNotifier> {
static const primaryColor = Color(0xFF5DBE82); //主题色 static const primaryColor = Color(0xFF5DBE82); //主题色
static const disabledMainColor = Color.fromRGBO(97, 190, 130, 0.5); static const disabledMainColor = Color.fromRGBO(97, 190, 130, 0.5);
...@@ -20,7 +26,10 @@ class AppConfig { ...@@ -20,7 +26,10 @@ class AppConfig {
return new Container( return new Container(
width: width, width: width,
height: height, height: height,
child: new Image.asset('images/placehoder_img.png',fit: BoxFit.cover,)); child: new Image.asset(
'images/placehoder_img.png',
fit: BoxFit.cover,
));
} }
static Widget getUserPlaceHoder(width, height) { static Widget getUserPlaceHoder(width, height) {
...@@ -34,20 +43,21 @@ class AppConfig { ...@@ -34,20 +43,21 @@ class AppConfig {
return new SizedBox( return new SizedBox(
width: width, width: width,
height: height, height: height,
child: const CircularProgressIndicator(strokeWidth: 2.0) child: const CircularProgressIndicator(strokeWidth: 2.0));
);
} }
//debug:false release: true //debug:false release: true
static const bool inProduction = const bool.fromEnvironment("dart.vm.product"); static const bool inProduction =
const bool.fromEnvironment("dart.vm.product");
static Widget initLoading(bool showEmpty, [String emptyText = '暂无数据']) { static Widget initLoading(bool showEmpty, [String emptyText = '暂无数据']) {
return new Center( return new Center(
child: showEmpty ? _initEmpty(emptyText) : SizedBox( child: showEmpty
? _initEmpty(emptyText)
: SizedBox(
width: 35.0, width: 35.0,
height: 35.0, height: 35.0,
child: const CircularProgressIndicator(strokeWidth: 2.0) child: const CircularProgressIndicator(strokeWidth: 2.0)),
),
); );
} }
...@@ -56,17 +66,107 @@ class AppConfig { ...@@ -56,17 +66,107 @@ class AppConfig {
padding: EdgeInsets.fromLTRB(0, 80, 0, 0), padding: EdgeInsets.fromLTRB(0, 80, 0, 0),
child: new Column( child: new Column(
children: <Widget>[ children: <Widget>[
new Icon(Icons.hourglass_empty, color: Colors.grey,size: 60,), new Icon(
new Container(height: 10,), Icons.hourglass_empty,
color: Colors.grey,
size: 60,
),
new Container(
height: 10,
),
new Text(emptyText) new Text(emptyText)
], ],
), ),
); );
} }
static UserTools userTools; static SharedPreferences _spf;
static List<SingleChildCloneableWidget> list = [
ChangeNotifierProvider<SettingProvide>.value(value: SettingProvide()),
];
static init() async { static init() async {
// userTools = await UserTools.getInstance();
}
}
const bool inProduction = const bool.fromEnvironment("dart.vm.product");
const BASEURL_RELEASE = 'https://api.github.com/';
const BASEURL_DEBUG = 'https://api.github.com/';
class ApiDio {
static ApiDio instance;
static ApiService apiService;
ApiDio() {
var options = new BaseOptions(
connectTimeout: 5000,
receiveTimeout: 3000,
baseUrl: inProduction ? BASEURL_RELEASE : BASEURL_DEBUG,
contentType: new ContentType('application', 'x-www-form-urlencoded',
charset: 'utf-8'));
Dio dio = new Dio(options);
dio.interceptors.add(AuthInterceptor()); // 添加 token
dio
..interceptors
.add(LogInterceptor(responseBody: true, requestBody: true)); //添加日志
apiService = new ApiService(dio);
}
static ApiService getInstance() {
if (instance == null) {
instance = new ApiDio();
}
return _getApiService();
} }
static ApiService _getApiService() {
return apiService;
}
}
class AuthInterceptor extends Interceptor {
String PLATFORM = "android";
String CLIENT = "store";
@override
onRequest(RequestOptions options) async {
Map<String, String> headers = new Map();
headers["Accept-Charset"] = "utf-8";
headers["Connection"] = "keep-alive";
headers["Accept"] = "*/*";
headers["x-version"] = "XXX";
headers["x-platform"] = PLATFORM;
headers["x-client"] = CLIENT;
headers["x-equCode"] = "XXX";
headers["Authorization"] = "XXX";
headers["token"] = "Xxx";
options.headers = headers;
return super.onRequest(options);
}
}
class ApiService {
ApiService(this.dio);
Dio dio;
Future _get(String url, {Map<String, dynamic> params}) async {
var response = await dio.get(url, queryParameters: params);
return response.data;
}
Future _post(String url, Map<String, dynamic> params) async {
var response = await dio.post(url, data: params);
return response.data;
}
Observable post(String url, Map<String, dynamic> params) =>
Observable.fromFuture(_post(url, params)).asBroadcastStream();
Observable get(String url, {Map<String, dynamic> params}) =>
Observable.fromFuture(_get(url, params: params)).asBroadcastStream();
} }
import 'dart:async'; import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provide/provide.dart'; import 'package:gmalpha_flutter/model/setting_model.dart';
import 'package:provider/provider.dart';
import 'package:rxdart/rxdart.dart'; import 'package:rxdart/rxdart.dart';
/// BaseProvide /// BaseProvide
class BaseProvide with ChangeNotifier { class BaseProvide with ChangeNotifier {
CompositeSubscription compositeSubscription = CompositeSubscription(); CompositeSubscription compositeSubscription = CompositeSubscription();
addSubscription(StreamSubscription subscription){ addSubscription(StreamSubscription subscription) {
compositeSubscription.add(subscription); compositeSubscription.add(subscription);
} }
...@@ -21,23 +20,37 @@ class BaseProvide with ChangeNotifier { ...@@ -21,23 +20,37 @@ class BaseProvide with ChangeNotifier {
} }
} }
abstract class PageProvideNode extends StatelessWidget { abstract class PageProvideNode<T extends ChangeNotifier>
final Providers mProviders = Providers(); extends StatelessWidget {
Widget buildContent(BuildContext context); Widget buildContent(BuildContext context);
T getProvider();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return ProviderNode( return ChangeNotifierProvider(
providers: mProviders, builder: (_) => getProvider(),
child: buildContent(context), child: buildContent(context),
); );
} }
} }
abstract class PageMultiProvideNode<T extends ChangeNotifier>
extends StatelessWidget {
Widget buildContent(BuildContext context);
abstract class BaseState<T extends StatefulWidget> extends State<T> { List<SingleChildCloneableWidget> getProviders();
@override
Widget build(BuildContext context) {
return MultiProvider(
providers: getProviders(),
child: buildContent(context),
);
}
}
abstract class BaseState<T extends StatefulWidget> extends State<T> {
@override @override
void initState() { void initState() {
super.initState(); super.initState();
......
class ThemeColorEvent{
int color;
ThemeColorEvent(this.color);
}
\ No newline at end of file
import 'dart:async';
import 'package:event_bus/event_bus.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_boost/flutter_boost.dart'; import 'package:flutter_boost/flutter_boost.dart';
import 'package:gmalpha_flutter/macros/ALColors.dart'; import 'package:gmalpha_flutter/macros/ALColors.dart';
import 'package:gmalpha_flutter/page/SettingPage.dart'; import 'package:gmalpha_flutter/page/SettingPage.dart';
import 'package:provider/provider.dart';
import 'base/app_config.dart'; import 'base/app_config.dart';
import 'base/base.dart';
import 'event/ThemeColorEvent.dart';
import 'model/setting_model.dart';
import 'simple_page_widgets.dart'; import 'simple_page_widgets.dart';
import 'comment_suggest.dart'; import 'comment_suggest.dart';
void main() async { void main() async {
await AppConfig.init(); await AppConfig.init();
runApp(MyApp());
runApp(MyApplication());
} }
class MyApplication extends PageMultiProvideNode {
class MyApp extends StatefulWidget { @override
Widget buildContent(BuildContext context) => MyApp();
@override
List<SingleChildCloneableWidget> getProviders() {
return AppConfig.list;
}
}
class MyApp extends StatefulWidget {
@override @override
_MyAppState createState() => _MyAppState(); _MyAppState createState() => _MyAppState();
} }
class _MyAppState extends State<MyApp> { class _MyAppState extends State<MyApp> {
EventBus eventBus = EventBus();
StreamSubscription _colorSubscription;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
//event bus example
_colorSubscription = eventBus.on<ThemeColorEvent>().listen((event) {
print("==========${event.color}");
});
eventBus.fire(ThemeColorEvent(0xffffffff));
FlutterBoost.singleton.registerPageBuilders({ FlutterBoost.singleton.registerPageBuilders({
'first': (pageName, params, _) => FirstRouteWidget(), 'first': (pageName, params, _) => FirstRouteWidget(),
'second': (pageName, params, _) => SecondRouteWidget(), 'second': (pageName, params, _) => SecondRouteWidget(),
'setting_page': (pageName, params, _) => SettingPage(params), 'setting_page': (pageName, params, _) => SettingPage(params),
"page_a": (pageName, params, _) => SettingPage(params),
// 'tab': (pageName, params, _) => TabRouteWidget(), // 'tab': (pageName, params, _) => TabRouteWidget(),
// 'flutterFragment': (pageName, params, _) => FragmentRouteWidget(params), // 'flutterFragment': (pageName, params, _) => FragmentRouteWidget(params),
// 'comment_suggest': (pageName, params, _) { // 'comment_suggest': (pageName, params, _) {
...@@ -44,6 +68,13 @@ class _MyAppState extends State<MyApp> { ...@@ -44,6 +68,13 @@ class _MyAppState extends State<MyApp> {
FlutterBoost.handleOnStartPage(); FlutterBoost.handleOnStartPage();
} }
@override
void dispose() {
// TODO: implement dispose
super.dispose();
_colorSubscription.cancel();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return MaterialApp( return MaterialApp(
...@@ -54,9 +85,14 @@ class _MyAppState extends State<MyApp> { ...@@ -54,9 +85,14 @@ class _MyAppState extends State<MyApp> {
// '/': (context) => SettingPage({"Cookie":" _gm_token=7e48641558699683; sessionid=nb3ze4ur7ucosln8sd8pzwojddenv9ym; _gtid=a1bc0a387e1911e996b9525400fa516d4094"}), // '/': (context) => SettingPage({"Cookie":" _gm_token=7e48641558699683; sessionid=nb3ze4ur7ucosln8sd8pzwojddenv9ym; _gtid=a1bc0a387e1911e996b9525400fa516d4094"}),
// },//调试的时候可以打开 // },//调试的时候可以打开
// builder: FlutterBoost.init(postPush: _onRoutePushed), // builder: FlutterBoost.init(postPush: _onRoutePushed),
home: SettingPage({"Cookie":" _gm_token=7e48641558699683; sessionid=nb3ze4ur7ucosln8sd8pzwojddenv9ym; _gtid=a1bc0a387e1911e996b9525400fa516d4094"}), home: SettingPage({
"Cookie":
" _gm_token=7e48641558699683; sessionid=nb3ze4ur7ucosln8sd8pzwojddenv9ym; _gtid=a1bc0a387e1911e996b9525400fa516d4094"
}),
theme: new ThemeData( theme: new ThemeData(
primaryColor: Colors.white, primaryColor: Colors.white,
appBarTheme: AppBarTheme(
color: Color(Provider.of<SettingProvide>(context).color)),
backgroundColor: Color(0xFFFFFFFF), backgroundColor: Color(0xFFFFFFFF),
accentColor: Color(0xFFFFFFFF), accentColor: Color(0xFFFFFFFF),
textTheme: TextTheme( textTheme: TextTheme(
......
...@@ -6,14 +6,18 @@ class SettingProvide extends BaseProvide { ...@@ -6,14 +6,18 @@ class SettingProvide extends BaseProvide {
final repo = new SettingRepo(); final repo = new SettingRepo();
bool isModifyAll = false; bool isModifyAll = false;
int listSize; int listSize = 4;
int color = 0xffFFFFFF;
bool canClick = true;
String name; String name;
String city; String city;
String email; String email;
String headUrl; String headUrl;
String userId; String userId;
bool bindIns = false; bool bindIns = true;
String tempName; String tempName;
String tempCity; String tempCity;
...@@ -48,7 +52,10 @@ class SettingProvide extends BaseProvide { ...@@ -48,7 +52,10 @@ class SettingProvide extends BaseProvide {
} }
void quitLogin() { void quitLogin() {
repo.quitLogin(); headUrl = "http://pic26.nipic.com/20121221/9252150_142515375000_2.jpg";
color = 0xff000000;
notifyListeners();
// repo.quitLogin();
} }
void clickCity() { void clickCity() {
...@@ -56,14 +63,22 @@ class SettingProvide extends BaseProvide { ...@@ -56,14 +63,22 @@ class SettingProvide extends BaseProvide {
} }
void clickIns() { void clickIns() {
if(bindIns) { if (bindIns) {
repo.clickIns(); repo.clickIns();
}else{ } else {
clickArguement(); clickArguement();
} }
} }
void loadData() =>
repo.loadData("1", "1").listen((data) {}).onError((error) {});
void clickArguement() { void clickArguement() {
repo.clickArguement(); repo.clickArguement();
} }
void clickLeft() {
color = 0xff000000;
notifyListeners();
}
} }
...@@ -4,43 +4,40 @@ import 'package:flutter/src/widgets/framework.dart'; ...@@ -4,43 +4,40 @@ import 'package:flutter/src/widgets/framework.dart';
import 'package:gmalpha_flutter/base/base.dart'; import 'package:gmalpha_flutter/base/base.dart';
import 'package:gmalpha_flutter/macros/ALColors.dart'; import 'package:gmalpha_flutter/macros/ALColors.dart';
import 'package:gmalpha_flutter/model/setting_model.dart'; import 'package:gmalpha_flutter/model/setting_model.dart';
import 'package:provide/provide.dart';
import 'package:flutter_boost/flutter_boost.dart'; import 'package:flutter_boost/flutter_boost.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:provider/provider.dart';
class SettingPage extends PageProvideNode { class SettingPage extends StatefulWidget {
final provide = new SettingProvide(); Map args;
SettingPage(Map args) { SettingPage(this.args) {
mProviders.provide(Provider<SettingProvide>.value(provide));
provide.init(args);
print(args); print(args);
} }
@override // @override
Widget buildContent(BuildContext context) => _HomeContentPage(provide); // Widget buildContent(BuildContext context) => _HomeContentPage();
} //
// @override
class _HomeContentPage extends StatefulWidget { // ChangeNotifier getProvider() {
SettingProvide provide; // var settingProvide = SettingProvide();
// settingProvide.init(args);
// return settingProvide;
// }
_HomeContentPage(this.provide); // @override
// Widget build(BuildContext context)=>_HomeContentPage();
@override @override
State<StatefulWidget> createState() { State<StatefulWidget> createState() => _HomeContentState();
return _HomeContentState();
}
} }
class _HomeContentState extends State<_HomeContentPage> { class _HomeContentState extends State<SettingPage> {
SettingProvide _provide;
var screenUtil;
TextEditingController textEditingController = TextEditingController(); TextEditingController textEditingController = TextEditingController();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_provide ??= widget.provide;
} }
@override @override
...@@ -49,46 +46,70 @@ class _HomeContentState extends State<_HomeContentPage> { ...@@ -49,46 +46,70 @@ class _HomeContentState extends State<_HomeContentPage> {
textEditingController.dispose(); textEditingController.dispose();
} }
var settingProvide = SettingProvide();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// if (screenUtil == null) { // return ChangeNotifierProvider.value(value: settingProvide
// screenUtil = new ScreenUtil(width: 375, height: 667)..init(context); // ,child: getMainView(),);
// } return getMainView();
}
getMainView() {
return Scaffold( return Scaffold(
appBar: new AppBar( appBar: new AppBar(
backgroundColor: Color(0xFFffffff),
elevation: 0, elevation: 0,
brightness: Brightness.light, brightness: Brightness.light,
leading: new GestureDetector( leading: GestureDetector(
child: new ImageIcon( onTap: () => clickAction(),
AssetImage('images/nav_back.png'), child: Padding(
color: ALColors.Color323232, padding: EdgeInsets.fromLTRB(10, 0, 0, 0),
child: ImageIcon(AssetImage("images/nav_back.png")),
), ),
onTap: () { ),
FlutterBoost.singleton.closePageForContext(context);
}), // leading: new GestureDetector(
// child: new ImageIcon(
// AssetImage('images/nav_back.png'),
// color: ALColors.Color323232,
// ),
// onTap: () {
// FlutterBoost.singleton.closePageForContext(context);
// }),[]
actions: <Widget>[ actions: <Widget>[
Container( Container(
height: double.infinity,
padding: EdgeInsets.fromLTRB(0, 0, 30, 0), padding: EdgeInsets.fromLTRB(0, 0, 30, 0),
child: Center(child: Provide( child: Text(
builder: (BuildContext c, Widget w, SettingProvide pro) {
return pro.isModifyAll
? Text(
"保存", "保存",
style: style: TextStyle(
TextStyle(fontSize: 14, color: Color(0xffC4C4C4)), fontSize: 14,
color: Color(Provider.of<SettingProvide>(context).color)),
),
) )
: Text(
"保存", // Container(
style: TextStyle(fontSize: 14, color: Colors.black), // height: double.infinity,
); // padding: EdgeInsets.fromLTRB(0, 0, 30, 0),
}))), // child: Center(
// child: Provider
// .of<SettingProvide>(context)
// .isModifyAll
// ? Text(
// "保存",
// style:
// TextStyle(fontSize: 14, color: Color(0xffC4C4C4)),
// )
// : Text(
// "保存",
// style: TextStyle(fontSize: 14, color: Colors.black),
// )),
// )
], ],
), ),
body: Column( body: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Container( Container(
padding: EdgeInsets.fromLTRB(29, 10, 0, 0), padding: EdgeInsets.fromLTRB(29, 10, 0, 0),
child: Text( child: Text(
...@@ -104,20 +125,21 @@ class _HomeContentState extends State<_HomeContentPage> { ...@@ -104,20 +125,21 @@ class _HomeContentState extends State<_HomeContentPage> {
child: Stack( child: Stack(
alignment: AlignmentDirectional.bottomEnd, alignment: AlignmentDirectional.bottomEnd,
children: <Widget>[ children: <Widget>[
Provide(builder: ClipOval(
(BuildContext context, Widget child, SettingProvide pro) { child: Provider.of<SettingProvide>(context).headUrl != null
return pro.headUrl == null ? CachedNetworkImage(
? Image.asset("images/icon_default_head.png") width: double.maxFinite,
: ClipOval( height: double.maxFinite,
child: CachedNetworkImage( imageUrl:
imageUrl: pro.headUrl, Provider.of<SettingProvide>(context).headUrl,
placeholder: (context, url) { placeholder: (context, url) {
return Image.asset( return Image.asset(
"images/icon_default_head.png"); "images/icon_default_head.png");
}, },
fit: BoxFit.cover,
)
: Image.asset("images/icon_default_head.png"),
), ),
);
}),
Image.asset("images/camera.png"), Image.asset("images/camera.png"),
], ],
), ),
...@@ -125,38 +147,33 @@ class _HomeContentState extends State<_HomeContentPage> { ...@@ -125,38 +147,33 @@ class _HomeContentState extends State<_HomeContentPage> {
), ),
Container( Container(
height: 240, height: 240,
child: Provide( child: ListView.separated(
builder: (BuildContext c, Widget w, SettingProvide pro) {
return ListView.separated(
padding: EdgeInsets.fromLTRB(30, 0, 30, 0), padding: EdgeInsets.fromLTRB(30, 0, 30, 0),
itemCount: pro.listSize, itemCount: Provider.of<SettingProvide>(context).listSize,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Provide(builder: (BuildContext context, Widget child,
SettingProvide pro) {
if (index == 0) { if (index == 0) {
return specialOneItem("昵称", index); return specialOneItem(context, "昵称", index);
} else if (index == 1) { } else if (index == 1) {
return ListItemView(context, "国家", pro.city, index); return ListItemView(context, "国家",
Provider.of<SettingProvide>(context).city, index);
} else if (index == 2) { } else if (index == 2) {
if (pro.bindIns) { if (Provider.of<SettingProvide>(context).bindIns) {
return ListItemView( return ListItemView(context, "我的Instagram账号",
context, "我的Instagram账号", pro.email, index); Provider.of<SettingProvide>(context).email, index);
} else { } else {
return ListItemView(context, "意见与建议", "", index); return ListItemView(context, "意见与建议", "", index);
} }
} else if (index == 3) { } else if (index == 3) {
return ListItemView(context, "意见与建议", "", index); return ListItemView(context, "意见与建议", "", index);
} }
});
}, },
separatorBuilder: (BuildContext context, int index) { separatorBuilder: (BuildContext context, int index) {
return new Divider( return new Divider(
height: 1.0, height: 1.0,
color: Color(0xffE4E4E4), color: Color(0xffE4E4E4),
); );
}, }),
); ),
})),
Container( Container(
padding: EdgeInsets.fromLTRB(30, 0, 30, 0), padding: EdgeInsets.fromLTRB(30, 0, 30, 0),
child: Divider( child: Divider(
...@@ -177,7 +194,7 @@ class _HomeContentState extends State<_HomeContentPage> { ...@@ -177,7 +194,7 @@ class _HomeContentState extends State<_HomeContentPage> {
"退出登入", "退出登入",
style: TextStyle(color: Color(0xff323232), fontSize: 14), style: TextStyle(color: Color(0xff323232), fontSize: 14),
), ),
onPressed: () => _provide.quitLogin(), onPressed: () => Provider.of<SettingProvide>(context).quitLogin(),
), ),
), ),
Expanded( Expanded(
...@@ -193,7 +210,7 @@ class _HomeContentState extends State<_HomeContentPage> { ...@@ -193,7 +210,7 @@ class _HomeContentState extends State<_HomeContentPage> {
return Container( return Container(
height: 60, height: 60,
child: GestureDetector( child: GestureDetector(
onTap: onListItemTap(index), onTap: onListItemTap(context, index),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Center( Center(
...@@ -220,57 +237,109 @@ class _HomeContentState extends State<_HomeContentPage> { ...@@ -220,57 +237,109 @@ class _HomeContentState extends State<_HomeContentPage> {
)); ));
} }
specialOneItem(String left, int index) { specialOneItem(BuildContext context, String left, int index) {
return Container( return Container(
height: 60, height: 60,
child: GestureDetector( child: GestureDetector(
onTap: onListItemTap(index), onTap: onListItemTap(context, index),
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Center( Center(
child: Text( child: Text(left,
left, style: TextStyle(fontSize: 13, color: Color(0xff323232))),
style: TextStyle(fontSize: 13, color: Color(0xff323232)),
),
), ),
Expanded( Expanded(
child: Container( child: Container(
width: double.maxFinite, width: double.maxFinite,
child: Provide(builder: child: TextField(
(BuildContext context, Widget w, SettingProvide pro) {
return TextField(
controller: textEditingController, controller: textEditingController,
textAlign: TextAlign.end, textAlign: TextAlign.end,
style: style: TextStyle(fontSize: 13, color: Color(0xff323232)),
TextStyle(fontSize: 13, color: Color(0xff323232)),
maxLines: 1, maxLines: 1,
showCursor: false, showCursor: false,
onEditingComplete: () { onEditingComplete: () {
pro.tempName = textEditingController.text; Provider.of<SettingProvide>(context).tempName =
pro.setSaveBtnStatus(); textEditingController.text;
Provider.of<SettingProvide>(context).setSaveBtnStatus();
}, },
decoration: InputDecoration( decoration: InputDecoration(
border: InputBorder.none, border: InputBorder.none,
hintText: pro.tempName, hintText: Provider.of<SettingProvide>(context).tempName,
hintStyle: TextStyle( hintStyle:
fontSize: 13, color: Color(0xff323232)))); TextStyle(fontSize: 13, color: Color(0xff323232)))),
}))), ),
)
], ],
), ),
), ),
); );
} }
onListItemTap(int index) { onListItemTap(BuildContext context, int index) {
if (index == 1) { if (index == 1) {
//点击国家 //点击国家
_provide.clickCity(); Provider.of<SettingProvide>(context).clickCity();
} else if (index == 2) { } else if (index == 2) {
//ins //ins
_provide.clickIns(); Provider.of<SettingProvide>(context).clickIns();
} else if (index == 3) { } else if (index == 3) {
//意见 //意见
_provide.clickArguement(); Provider.of<SettingProvide>(context).clickArguement();
} }
} }
clickAction() {
Provider.of<SettingProvide>(context).clickLeft();
}
} }
class my extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
// TODO: implement paint
}
@override
bool shouldRepaint(CustomPainter oldDelegate) {
// TODO: implement shouldRepaint
return null;
}
}
class CircleView extends SingleChildRenderObjectWidget {
@override
RenderObject createRenderObject(BuildContext context) {
return null;
}
}
//class A extends StatefulWidget{
//
//
// A(
// ......
//
// ){
// .........
// }
//
//
//
// @override
// State<StatefulWidget> createState() {
// // TODO: implement createState
// return null;
// }
//
//}
//
//class st extends State{
// @override
// Widget build(BuildContext context) {
//
// return Container(
//
//
// )
// }
//}
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:gmalpha_flutter/base/app_config.dart';
import 'package:rxdart/rxdart.dart';
const settingChannel = const MethodChannel('flutter.io/setting_channel_method'); const settingChannel = const MethodChannel('flutter.io/setting_channel_method');
class SettingRepo { class SettingRepo {
getInstance(){
return 0;
}
Future<bool> quitLogin() async { Future<bool> quitLogin() async {
await settingChannel.invokeMethod("quit_login", null); await settingChannel.invokeMethod("quit_login", {"a":"a","a":"a"});
} }
Future<String> clickCity() async { Future<String> clickCity() async {
...@@ -18,4 +25,13 @@ class SettingRepo { ...@@ -18,4 +25,13 @@ class SettingRepo {
Future<String> clickArguement() async { Future<String> clickArguement() async {
await settingChannel.invokeMethod("click_arguement", null); await settingChannel.invokeMethod("click_arguement", null);
} }
Observable loadData(String pageNum, String pageSize) {
Map<String, String> map = new Map();
map["pageNum"] = pageNum;
map["pageSize"] = pageSize;
return ApiDio.getInstance().get("good/list", params: map);
}
} }
...@@ -71,20 +71,25 @@ packages: ...@@ -71,20 +71,25 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.13" version: "2.1.13"
event_bus:
dependency: "direct main"
description:
name: event_bus
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
source: sdk source: sdk
version: "0.0.0" version: "0.0.0"
flutter_boost: flutter_boost:
dependency: "direct dev" dependency: "direct main"
description: description:
path: "." name: flutter_boost
ref: "0.0.411" url: "https://pub.flutter-io.cn"
resolved-ref: "3978c43c31c1c29b569724fd330b367caa459acc" source: hosted
url: "https://github.com/alibaba/flutter_boost.git" version: "0.0.420"
source: git
version: "0.0.411"
flutter_cache_manager: flutter_cache_manager:
dependency: transitive dependency: transitive
description: description:
......
...@@ -12,72 +12,41 @@ dependencies: ...@@ -12,72 +12,41 @@ dependencies:
# The following adds the Cupertino Icons font to your application. # The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons. # Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2 cupertino_icons: ^0.1.2
# 网络库
dio: ^2.1.0 dio: ^2.1.0
# 状态管理库
provider: ^3.0.0+1 provider: ^3.0.0+1
provide: ^1.0.2 provide: ^1.0.2
rxdart: ^0.21.0 rxdart: ^0.21.0
flutter_screenutil: ^0.3.0 flutter_screenutil: ^0.3.0
shared_preferences: ^0.5.1+2 shared_preferences: ^0.5.1+2
cached_network_image: 1.1.0 cached_network_image: 1.1.0
flutter_boost: ^0.0.415
# event bus
event_bus: ^1.1.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:
sdk: flutter sdk: flutter
flutter_boost:
git:
url: 'https://github.com/alibaba/flutter_boost.git'
ref: '0.0.411'
# native_flutter_transfer_plugin: # native_flutter_transfer_plugin:
# git: # git:
# url: 'git@git.wanmeizhensuo.com:mobile/native_flutter_transfer_plugin.git' # url: 'git@git.wanmeizhensuo.com:mobile/native_flutter_transfer_plugin.git'
# ref: '0.0.1' # ref: '0.0.1'
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
flutter: flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true uses-material-design: true
# To add Flutter specific assets to your application, add an assets section,
# like this:
assets: assets:
- images/nav_back.png - images/nav_back.png
- images/camera.png - images/camera.png
- images/right_arrow.png - images/right_arrow.png
- images/icon_default_head.png - images/icon_default_head.png
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages
# To add Flutter specific custom fonts to your application, add a fonts
# section here, in this "flutter" section. Each entry in this list should
# have a "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
module: module:
androidPackage: com.example.gmalpha_flutter androidPackage: com.example.gmalpha_flutter
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment