1,引入高德定位Flutter插件
在Flutter工程的pubspec.yaml里的dependencies添加如下代碼引入高德定位Flutter插件
?dependencies:
??amap_flutter_location: ^3.0.0
然后執(zhí)行flutter pub get?獲取高定位Flutter插件
2,在podfile中配置 pod 'AMapLocation-NO-IDFA',在終端執(zhí)行pod install的時(shí)候,報(bào)錯(cuò)如下圖:


3,解決辦法:
用source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git替換到cdn源
如下圖:

4,重新pod install,配置成功如下圖:
