diff --git a/android/app/build.gradle b/android/app/build.gradle index 297c67e..d7ec1eb 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -23,6 +23,7 @@ if (flutterVersionName == null) { apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' +apply plugin: 'com.google.firebase.crashlytics' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" diff --git a/android/build.gradle b/android/build.gradle index e62a641..649d8f3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -9,6 +9,7 @@ buildscript { classpath 'com.android.tools.build:gradle:3.5.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.3.5' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.1' } } diff --git a/lib/main.dart b/lib/main.dart index c2077a2..9dd0dc4 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,7 @@ // Flutter imports: import 'package:aku_community_manager/style/apptheme.dart'; import 'package:aku_community_manager/utils/dev_util.dart'; +import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -21,6 +22,7 @@ import 'package:aku_community_manager/ui/splash/splash_page.dart'; void main() async { WidgetsFlutterBinding.ensureInitialized(); + // await Firebase.initializeApp(); // await AmapCore.init(''); // await AmapLocation.instance.init(iosKey: ''); JPush jpush = new JPush(); diff --git a/lib/ui/home/home_page.dart b/lib/ui/home/home_page.dart index 624b60e..a3c0f2c 100644 --- a/lib/ui/home/home_page.dart +++ b/lib/ui/home/home_page.dart @@ -2,16 +2,15 @@ import 'package:aku_community_manager/const/api.dart'; import 'package:aku_community_manager/models/announce/announcement_list_model.dart'; import 'package:aku_community_manager/models/manager/bussiness_and_fix/bussiness_and_fix_model.dart'; -import 'package:aku_community_manager/models/manager/decoration/decoration_list_model.dart'; import 'package:aku_community_manager/models/manager/item_num_model.dart'; import 'package:aku_community_manager/models/todo_bussiness/todo_model.dart'; import 'package:aku_community_manager/models/todo_bussiness/todo_outdoor_model.dart'; -import 'package:aku_community_manager/ui/home/business/business_view.dart'; import 'package:aku_community_manager/ui/home/business/bussiness_func.dart'; import 'package:aku_community_manager/ui/home/business/todo_outdoor_card.dart'; import 'package:aku_community_manager/utils/network/base_list_model.dart'; import 'package:aku_community_manager/utils/network/net_util.dart'; import 'package:dio/dio.dart'; +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:shimmer/shimmer.dart'; @@ -27,8 +26,6 @@ import 'package:provider/provider.dart'; // Project imports: import 'package:aku_community_manager/const/resource.dart'; -import 'package:aku_community_manager/mock_models/all_model.dart'; -import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart'; import 'package:aku_community_manager/provider/app_provider.dart'; import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/style/app_style.dart'; @@ -44,7 +41,6 @@ import 'package:aku_community_manager/ui/login/login_page.dart'; import 'package:aku_community_manager/ui/settings/user_info_page.dart'; import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_and_fix_page.dart'; import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_fix_card.dart'; -import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_card.dart'; import 'package:aku_community_manager/ui/sub_pages/visitor_manager/visitor_manager_page.dart'; import 'package:aku_community_manager/ui/tool_pages/warning/warning_page.dart'; import 'package:aku_community_manager/ui/widgets/app_widgets/aku_avatar.dart'; @@ -475,10 +471,8 @@ class _HomePageState extends State { child: Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.center, - children: _anounceMentList - .map((e) { - int index = _anounceMentList - .indexOf(e); + children: _anounceMentList.map((e) { + int index = _anounceMentList.indexOf(e); return Container( width: 12.w, height: 12.w, diff --git a/lib/ui/splash/splash_page.dart b/lib/ui/splash/splash_page.dart index e571965..5a17e44 100644 --- a/lib/ui/splash/splash_page.dart +++ b/lib/ui/splash/splash_page.dart @@ -1,12 +1,8 @@ // Flutter imports: -import 'package:aku_community_manager/const/api.dart'; -import 'package:aku_community_manager/models/manager/item_num_model.dart'; import 'package:aku_community_manager/provider/app_provider.dart'; import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/style/app_style.dart'; import 'package:aku_community_manager/utils/dev_util.dart'; -import 'package:aku_community_manager/utils/network/net_util.dart'; -import 'package:dio/dio.dart'; import 'package:firebase_core/firebase_core.dart'; import 'package:flutter/material.dart'; @@ -14,7 +10,6 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart' hide Response; import 'package:hive/hive.dart'; import 'package:hive_flutter/hive_flutter.dart'; -import 'package:jpush_flutter/jpush_flutter.dart'; import 'package:permission_handler/permission_handler.dart'; import 'package:power_logger/power_logger.dart';