张延森 3 年之前
父節點
當前提交
a8ed07d7d6

+ 1
- 4
android/app/build.gradle 查看文件

55
     }
55
     }
56
 
56
 
57
     dependencies {
57
     dependencies {
58
-//        implementation fileTree(dir: 'libs', include: ['*.jar'])
59
-//        implementation('com.amap.api:map2d:6.0.0')
60
-//        implementation('com.amap.api:search:9.2.0')
61
-//        implementation('com.amap.api:location:6.1.0')
58
+//        implementation 'com.google.android.material:material:1.5.0'
62
         implementation('com.amap.api:3dmap:9.1.0')
59
         implementation('com.amap.api:3dmap:9.1.0')
63
     }
60
     }
64
 
61
 

+ 1
- 1
android/app/src/main/AndroidManifest.xml 查看文件

25
     <!--允许读设备等信息,用于问题排查-->
25
     <!--允许读设备等信息,用于问题排查-->
26
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
26
     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
27
    <application
27
    <application
28
-        android:label="farmer_client"
28
+        android:label="农忙助手"
29
         android:name="${applicationName}"
29
         android:name="${applicationName}"
30
         android:icon="@mipmap/ic_launcher">
30
         android:icon="@mipmap/ic_launcher">
31
         <activity
31
         <activity

+ 5
- 6
android/app/src/main/res/drawable/launch_background.xml 查看文件

2
 <!-- Modify this file to customize your launch splash screen -->
2
 <!-- Modify this file to customize your launch splash screen -->
3
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
3
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
4
     <item android:drawable="@android:color/white" />
4
     <item android:drawable="@android:color/white" />
5
-
6
     <!-- You can insert your own image images here -->
5
     <!-- You can insert your own image images here -->
7
-    <!-- <item>
8
-        <bitmap
9
-            android:gravity="center"
10
-            android:src="@mipmap/launch_image" />
11
-    </item> -->
6
+<!--    <item>-->
7
+<!--        <bitmap-->
8
+<!--            android:gravity="fill"-->
9
+<!--            android:src="@drawable/launch_image" />-->
10
+<!--    </item>-->
12
 </layer-list>
11
 </layer-list>

二進制
android/app/src/main/res/drawable/launch_image.png 查看文件


+ 3
- 1
android/app/src/main/res/values/styles.xml 查看文件

4
     <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
4
     <style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
5
         <!-- Show a splash screen on the activity. Automatically removed when
5
         <!-- Show a splash screen on the activity. Automatically removed when
6
              Flutter draws its first frame -->
6
              Flutter draws its first frame -->
7
-        <item name="android:windowBackground">@drawable/launch_background</item>
7
+<!--        <item name="android:windowBackground">@drawable/launch_image</item>-->
8
+        <item name="android:windowBackground">@drawable/launch_image</item>
8
     </style>
9
     </style>
9
     <!-- Theme applied to the Android Window as soon as the process has started.
10
     <!-- Theme applied to the Android Window as soon as the process has started.
10
          This theme determines the color of the Android Window while your
11
          This theme determines the color of the Android Window while your
14
          This Theme is only used starting with V2 of Flutter's Android embedding. -->
15
          This Theme is only used starting with V2 of Flutter's Android embedding. -->
15
     <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16
     <style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
16
         <item name="android:windowBackground">?android:colorBackground</item>
17
         <item name="android:windowBackground">?android:colorBackground</item>
18
+<!--        <item name="android:windowBackground">@drawable/launch_background</item>-->
17
     </style>
19
     </style>
18
 </resources>
20
 </resources>

+ 5
- 5
lib/routes/middleWares.dart 查看文件

9
   bool isSplashScreen = routing?.current == '/splash';
9
   bool isSplashScreen = routing?.current == '/splash';
10
   bool isLoginPage = routing?.current == '/login';
10
   bool isLoginPage = routing?.current == '/login';
11
   bool isAgreementPage = routing?.current == '/agreement';
11
   bool isAgreementPage = routing?.current == '/agreement';
12
-  // if (!isLogin && !isSplashScreen && !isLoginPage&&!isAgreementPage) {
13
-  //   // addPostFrameCallback 作用是等当前帧绘制完成之后再加载
14
-  //   // https://github.com/jonataslaw/getx/issues/262
15
-  //   SchedulerBinding.instance?.addPostFrameCallback((_) => Get.offNamed('/login'));
16
-  // }
12
+  if (!isLogin && !isSplashScreen && !isLoginPage&&!isAgreementPage) {
13
+    // addPostFrameCallback 作用是等当前帧绘制完成之后再加载
14
+    // https://github.com/jonataslaw/getx/issues/262
15
+    SchedulerBinding.instance?.addPostFrameCallback((_) => Get.offNamed('/login'));
16
+  }
17
 }
17
 }

+ 1
- 1
lib/routes/pages.dart 查看文件

17
 List<GetPage> pages = [
17
 List<GetPage> pages = [
18
   GetPage(name: '/', page: () =>  Home()),
18
   GetPage(name: '/', page: () =>  Home()),
19
   GetPage(name: '/ArticleInfo', page: () =>  ArticleInfo()),//资讯详情
19
   GetPage(name: '/ArticleInfo', page: () =>  ArticleInfo()),//资讯详情
20
-  GetPage(name: '/splash', page: () => MachineryMapPage()),//SplashScreen
20
+  GetPage(name: '/splash', page: () => SplashScreen()),//SplashScreen
21
   GetPage(name: '/login', page: () =>  MyRouteLogin()),
21
   GetPage(name: '/login', page: () =>  MyRouteLogin()),
22
   GetPage(name: '/addressList', page: () =>  AddressList()),
22
   GetPage(name: '/addressList', page: () =>  AddressList()),
23
   GetPage(name: '/addAddress', page: () =>  AddAddress()),
23
   GetPage(name: '/addAddress', page: () =>  AddAddress()),