upgrade dep amap location

master
laiiihz 5 years ago
parent b272c2cd4f
commit ac35352886

@ -26,7 +26,8 @@
android:name="io.flutter.app.FlutterApplication"
android:label="瑞库客"
android:icon="@mipmap/ic_launcher"
tools:replace="android:name">
tools:replace="android:label"
>
<meta-data android:name="com.amap.api.v2.apikey" android:value="7225bca14fe7493f9f469315a933f99c"/>
<activity

@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:amap_map_fluttify/amap_map_fluttify.dart';
import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bugly/flutter_bugly.dart';
@ -29,6 +30,7 @@ List<CameraDescription> cameras;
void main() async {
WidgetsFlutterBinding.ensureInitialized();
cameras = await availableCameras();
AmapLocation.instance.init(iosKey: 'e8a8057cfedcdcadcf4e8f2c7f8de982');
AppConfig.initial(useEncrypt: false
///

@ -10,13 +10,12 @@ import 'dart:async';
import 'dart:collection';
import 'dart:convert';
import 'dart:io';
import 'package:amap_location_fluttify/amap_location_fluttify.dart';
import 'package:amap_map_fluttify/amap_map_fluttify.dart';
import 'package:dio/dio.dart';
import 'package:extended_image/extended_image.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:oktoast/oktoast.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:recook/base/base_store_state.dart';
import 'package:recook/constants/api.dart';
@ -141,8 +140,6 @@ class _HomePageState extends BaseStoreState<HomePage>
super.initState();
//
_mobShareInit();
//
_amapInit();
//
WeChatUtils.initial();
// meiqia
@ -1305,7 +1302,7 @@ class _HomePageState extends BaseStoreState<HomePage>
// if (_weatherLocation==null)
if (await requestPermission())
_weatherLocation = await AmapLocation.fetchLocation();
_weatherLocation = await AmapLocation.instance.fetchLocation();
String url =
"https://tianqiapi.com/api?version=v61&appid=81622428&appsecret=AxKzYWq3";
@ -1339,10 +1336,6 @@ class _HomePageState extends BaseStoreState<HomePage>
SharesdkPlugin.regist(register);
}
_amapInit() {
AmapCore.init("e8a8057cfedcdcadcf4e8f2c7f8de982");
}
Future<bool> requestPermission() async {
final permissions = await PermissionHandler()
.requestPermissions([PermissionGroup.location]);

@ -7,14 +7,28 @@ packages:
name: amap_core_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.9.5"
version: "0.12.0"
amap_location_fluttify:
dependency: "direct main"
dependency: transitive
description:
name: amap_location_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.13.0"
version: "0.18.0"
amap_map_fluttify:
dependency: "direct main"
description:
name: amap_map_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.29.0"
amap_search_fluttify:
dependency: transitive
description:
name: amap_search_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.14.0"
analyzer:
dependency: transitive
description:
@ -196,7 +210,7 @@ packages:
name: core_location_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.4"
version: "0.4.1"
crypto:
dependency: transitive
description:
@ -463,7 +477,7 @@ packages:
name: foundation_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.8.12"
version: "0.9.9"
front_end:
dependency: transitive
description:
@ -590,13 +604,6 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.3.19"
latlng:
dependency: transitive
description:
name: latlng
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.2"
logging:
dependency: transitive
description:
@ -975,6 +982,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.0-nullsafety.1"
tencent_live_fluttify:
dependency: "direct main"
description:
name: tencent_live_fluttify
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.0+1"
term_glyph:
dependency: transitive
description:

@ -19,7 +19,7 @@ dependencies:
timeline_tile: 0.1.2
# 高德定位
amap_location_fluttify: 0.13.0
amap_map_fluttify:
# icons
flutter_icons: 1.1.0
# 拼音
@ -178,7 +178,7 @@ dependencies:
flip_card: ^0.4.4
#腾讯直播
tencent_live_fluttify: ^0.2.0+1
#瀑布流
waterfall_flow: 2.0.3
#相机

Loading…
Cancel
Save