Commit 522615568737ea273d71ed71f792da16946c741a

Authored by wdn127929
1 parent 3be2694a

地图页闪退&&拍照黑屏几秒

@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
31 android:icon="@mipmap/ic_launcher" 31 android:icon="@mipmap/ic_launcher"
32 android:requestLegacyExternalStorage="true" 32 android:requestLegacyExternalStorage="true"
33 android:preserveLegacyExternalStorage="true" 33 android:preserveLegacyExternalStorage="true"
  34 + android:allowNativeHeapPointerTagging="false"
34 > 35 >
35 36
36 <activity 37 <activity
@@ -68,7 +68,17 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> { @@ -68,7 +68,17 @@ class _MapChoicePointPageState extends State<MapChoicePointPage> {
68 _requestLocationPermission() async { 68 _requestLocationPermission() async {
69 await AmapLocation.instance.updatePrivacyShow(true); 69 await AmapLocation.instance.updatePrivacyShow(true);
70 await AmapLocation.instance.updatePrivacyAgree(true); 70 await AmapLocation.instance.updatePrivacyAgree(true);
71 - bool canLocation = await requestPermission(Permission.location); 71 + bool canLocation = false;
  72 +
  73 + if (!(await checkPermission(Permission.location))) {
  74 + //没有定位权限
  75 +
  76 + //申请定位权限
  77 + canLocation = await requestPermission(Permission.location);
  78 + } else {
  79 + canLocation = true;
  80 + }
  81 + // bool canLocation = await requestPermission(Permission.location);
72 // 单次定位 82 // 单次定位
73 if (canLocation) { 83 if (canLocation) {
74 Future.delayed(Duration(milliseconds: 200), () async { 84 Future.delayed(Duration(milliseconds: 200), () async {
@@ -233,11 +233,11 @@ class DialogUtil { @@ -233,11 +233,11 @@ class DialogUtil {
233 233
234 static showAuthorityDestination( 234 static showAuthorityDestination(
235 BuildContext context, String name, String title, String subTitle) async { 235 BuildContext context, String name, String title, String subTitle) async {
236 - // Timer _timer = Timer(const Duration(seconds: 2), () {  
237 - // // if(!TickerMode.of(context)){  
238 - // Navigator.of(context).pop(true);  
239 - // // }  
240 - // }); 236 + Timer _timer = Timer(const Duration(seconds: 2), () {
  237 + // if(!TickerMode.of(context)){
  238 + Navigator.of(context).pop(true);
  239 + // }
  240 + });
241 final action = await showDialog( 241 final action = await showDialog(
242 context: context, 242 context: context,
243 barrierDismissible: true, 243 barrierDismissible: true,
@@ -288,7 +288,7 @@ class DialogUtil { @@ -288,7 +288,7 @@ class DialogUtil {
288 }); 288 });
289 289
290 print(action); 290 print(action);
291 - // _timer.cancel(); 291 + _timer.cancel();
292 292
293 return action; 293 return action;
294 } 294 }
@@ -14,28 +14,28 @@ packages: @@ -14,28 +14,28 @@ packages:
14 name: amap_core_fluttify 14 name: amap_core_fluttify
15 url: "https://pub.flutter-io.cn" 15 url: "https://pub.flutter-io.cn"
16 source: hosted 16 source: hosted
17 - version: "0.17.0-rc.0" 17 + version: "0.17.0"
18 amap_location_fluttify: 18 amap_location_fluttify:
19 dependency: transitive 19 dependency: transitive
20 description: 20 description:
21 name: amap_location_fluttify 21 name: amap_location_fluttify
22 url: "https://pub.flutter-io.cn" 22 url: "https://pub.flutter-io.cn"
23 source: hosted 23 source: hosted
24 - version: "0.22.0-rc.0" 24 + version: "0.22.0"
25 amap_map_fluttify: 25 amap_map_fluttify:
26 dependency: "direct main" 26 dependency: "direct main"
27 description: 27 description:
28 name: amap_map_fluttify 28 name: amap_map_fluttify
29 url: "https://pub.flutter-io.cn" 29 url: "https://pub.flutter-io.cn"
30 source: hosted 30 source: hosted
31 - version: "2.0.0-rc.1" 31 + version: "2.0.2"
32 amap_search_fluttify: 32 amap_search_fluttify:
33 dependency: transitive 33 dependency: transitive
34 description: 34 description:
35 name: amap_search_fluttify 35 name: amap_search_fluttify
36 url: "https://pub.flutter-io.cn" 36 url: "https://pub.flutter-io.cn"
37 source: hosted 37 source: hosted
38 - version: "0.18.0-rc.0" 38 + version: "0.18.0"
39 analyzer: 39 analyzer:
40 dependency: transitive 40 dependency: transitive
41 description: 41 description:
@@ -329,7 +329,7 @@ packages: @@ -329,7 +329,7 @@ packages:
329 name: core_location_fluttify 329 name: core_location_fluttify
330 url: "https://pub.flutter-io.cn" 330 url: "https://pub.flutter-io.cn"
331 source: hosted 331 source: hosted
332 - version: "0.7.0-rc.0" 332 + version: "0.7.1"
333 cross_file: 333 cross_file:
334 dependency: transitive 334 dependency: transitive
335 description: 335 description:
@@ -713,7 +713,7 @@ packages: @@ -713,7 +713,7 @@ packages:
713 name: foundation_fluttify 713 name: foundation_fluttify
714 url: "https://pub.flutter-io.cn" 714 url: "https://pub.flutter-io.cn"
715 source: hosted 715 source: hosted
716 - version: "0.13.0-rc.0" 716 + version: "0.13.0+1"
717 frontend_server_client: 717 frontend_server_client:
718 dependency: transitive 718 dependency: transitive
719 description: 719 description:
@@ -1455,7 +1455,7 @@ packages: @@ -1455,7 +1455,7 @@ packages:
1455 name: url_launcher 1455 name: url_launcher
1456 url: "https://pub.flutter-io.cn" 1456 url: "https://pub.flutter-io.cn"
1457 source: hosted 1457 source: hosted
1458 - version: "6.1.2" 1458 + version: "6.1.11"
1459 url_launcher_android: 1459 url_launcher_android:
1460 dependency: transitive 1460 dependency: transitive
1461 description: 1461 description:
@@ -1490,7 +1490,7 @@ packages: @@ -1490,7 +1490,7 @@ packages:
1490 name: url_launcher_platform_interface 1490 name: url_launcher_platform_interface
1491 url: "https://pub.flutter-io.cn" 1491 url: "https://pub.flutter-io.cn"
1492 source: hosted 1492 source: hosted
1493 - version: "2.0.5" 1493 + version: "2.1.3"
1494 url_launcher_web: 1494 url_launcher_web:
1495 dependency: transitive 1495 dependency: transitive
1496 description: 1496 description:
@@ -168,7 +168,7 @@ dependencies: @@ -168,7 +168,7 @@ dependencies:
168 video_compress: ^3.1.1 168 video_compress: ^3.1.1
169 #高德地图 169 #高德地图
170 # amap_map_fluttify: 0.25.0 170 # amap_map_fluttify: 0.25.0
171 - amap_map_fluttify: ^2.0.0-rc.1 171 + amap_map_fluttify: ^2.0.2
172 172
173 #虚线边框 173 #虚线边框
174 dotted_border: ^1.0.7 174 dotted_border: ^1.0.7