diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 79b7d9e..c0db295 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -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"
+ >
cameras;
void main() async {
WidgetsFlutterBinding.ensureInitialized();
cameras = await availableCameras();
+ AmapLocation.instance.init(iosKey: 'e8a8057cfedcdcadcf4e8f2c7f8de982');
AppConfig.initial(useEncrypt: false
/// 网络请求加密功能
diff --git a/lib/pages/home/home_page.dart b/lib/pages/home/home_page.dart
index 854c909..948415e 100644
--- a/lib/pages/home/home_page.dart
+++ b/lib/pages/home/home_page.dart
@@ -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
super.initState();
// 分享注册
_mobShareInit();
- // 高德定位注册
- _amapInit();
// 判断微信是否登录
WeChatUtils.initial();
// meiqia注册
@@ -1305,7 +1302,7 @@ class _HomePageState extends BaseStoreState
// 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
SharesdkPlugin.regist(register);
}
- _amapInit() {
- AmapCore.init("e8a8057cfedcdcadcf4e8f2c7f8de982");
- }
-
Future requestPermission() async {
final permissions = await PermissionHandler()
.requestPermissions([PermissionGroup.location]);
diff --git a/pubspec.lock b/pubspec.lock
index eb2527b..b937637 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -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:
diff --git a/pubspec.yaml b/pubspec.yaml
index 964b170..85bd099 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -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
#相机