From d3c5e69920c24fcb5acaa6b42112b32e44c6bb33 Mon Sep 17 00:00:00 2001 From: KenZR Date: Fri, 1 Mar 2019 18:54:43 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0firebase=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=20fixed:=E5=A2=9E=E5=8A=A0=E9=A6=96=E9=A1=B5=E9=80=9A?= =?UTF-8?q?=E6=A0=8F=E9=97=B4=E9=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/.project | 17 +++ .../org.eclipse.buildship.core.prefs | 2 + android/app/.classpath | 6 + android/app/.project | 23 ++++ .../org.eclipse.buildship.core.prefs | 2 + android/app/build.gradle | 6 +- android/app/google-services.json | 42 +++++++ android/app/src/main/AndroidManifest.xml | 4 +- .../beer}/MainActivity.java | 2 +- android/app/src/main/res/values/styles.xml | 1 + android/build.gradle | 2 + lib/components/widgetComp.dart | 10 ++ lib/main.dart | 3 + lib/page/component/index.dart | 117 +++++++++--------- lib/router/index.dart | 7 +- lib/utils/analytics.dart | 7 ++ lib/utils/share.dart | 5 + pubspec.yaml | 3 +- 18 files changed, 196 insertions(+), 63 deletions(-) create mode 100644 android/.project create mode 100644 android/.settings/org.eclipse.buildship.core.prefs create mode 100644 android/app/.classpath create mode 100644 android/app/.project create mode 100644 android/app/.settings/org.eclipse.buildship.core.prefs create mode 100644 android/app/google-services.json rename android/app/src/main/java/com/{example/efoxflutter => flutter/beer}/MainActivity.java (91%) create mode 100644 lib/utils/analytics.dart create mode 100644 lib/utils/share.dart diff --git a/android/.project b/android/.project new file mode 100644 index 0000000..3964dd3 --- /dev/null +++ b/android/.project @@ -0,0 +1,17 @@ + + + android + Project android created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..e889521 --- /dev/null +++ b/android/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir= +eclipse.preferences.version=1 diff --git a/android/app/.classpath b/android/app/.classpath new file mode 100644 index 0000000..eb19361 --- /dev/null +++ b/android/app/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/android/app/.project b/android/app/.project new file mode 100644 index 0000000..ac485d7 --- /dev/null +++ b/android/app/.project @@ -0,0 +1,23 @@ + + + app + Project app created by Buildship. + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/android/app/.settings/org.eclipse.buildship.core.prefs b/android/app/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..b1886ad --- /dev/null +++ b/android/app/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir=.. +eclipse.preferences.version=1 diff --git a/android/app/build.gradle b/android/app/build.gradle index 16e0c1a..27a914c 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -33,7 +33,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.efoxflutter" + applicationId "com.flutter.beer" minSdkVersion 16 targetSdkVersion 27 versionCode flutterVersionCode.toInteger() @@ -58,4 +58,8 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + //firebase + implementation 'com.google.firebase:firebase-core:16.0.7' } +//firebase +apply plugin: 'com.google.gms.google-services' \ No newline at end of file diff --git a/android/app/google-services.json b/android/app/google-services.json new file mode 100644 index 0000000..48216fc --- /dev/null +++ b/android/app/google-services.json @@ -0,0 +1,42 @@ +{ + "project_info": { + "project_number": "27281760426", + "firebase_url": "https://efox-flutter.firebaseio.com", + "project_id": "efox-flutter", + "storage_bucket": "efox-flutter.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:27281760426:android:51548b1d738060a2", + "android_client_info": { + "package_name": "com.flutter.beer" + } + }, + "oauth_client": [ + { + "client_id": "27281760426-to57nfnn76jt4696hlg63lvr7g2po8u5.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyDdh4EwOeSv9fWPH8CbEsHZz7jJ_Lsn4Bo" + } + ], + "services": { + "analytics_service": { + "status": 1 + }, + "appinvite_service": { + "status": 1, + "other_platform_oauth_client": [] + }, + "ads_service": { + "status": 2 + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 90db689..2e9846d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.flutter.beer"> + Efox Flutter