小编Aru*_*run的帖子

在 Flutter 中根据当前位置的经纬度获取完整地址详细信息

我已经在flutter 中使用了位置插件,我只能得到和。如何获取完整的地址详细信息。代码如下。latitudelongitude

Future<Map<String, double>> _getLocation() async {
//var currentLocation = <String, double>{};
Map<String,double> currentLocation;
try {
  currentLocation = await location.getLocation();
} catch (e) {
  currentLocation = null;
}
setState(() {
  userLocation = currentLocation;
});
return currentLocation;



}
Run Code Online (Sandbox Code Playgroud)

android flutter

10
推荐指数
4
解决办法
3万
查看次数

标签 统计

android ×1

flutter ×1