我已经在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)