We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
` void initState() { super.initState(); setState(() { this.isLoading = true; });
AMapLocationClient.startup(new AMapLocationOption( desiredAccuracy: CLLocationAccuracy.kCLLocationAccuracyHundredMeters)); getCurrentLocation();
} Future requestPermission() async { final permissions = await PermissionHandler() .requestPermissions([PermissionGroup.location]);
if (permissions[PermissionGroup.location] == PermissionStatus.granted) { return true; } else { CLToast.showToast('需要定位权限'); return false; }
}
Future getCurrentLocation() async { if (await requestPermission()) { AMapLocation loc = await AMapLocationClient.getLocation(true); log('123123123' + loc.latitude.toString() + loc.longitude.toString()); setState(() { this._location = loc; }); } }`
D/AmapLocationPugin( 4608): 定位获取结果:0.0 code:7 省: D/AmapLocationPugin( 4608): 定位获取结果:0.0 code:7 省:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
`
void initState() {
super.initState();
setState(() {
this.isLoading = true;
});
}
Future requestPermission() async {
final permissions = await PermissionHandler()
.requestPermissions([PermissionGroup.location]);
}
Future getCurrentLocation() async {
if (await requestPermission()) {
AMapLocation loc = await AMapLocationClient.getLocation(true);
log('123123123' + loc.latitude.toString() + loc.longitude.toString());
setState(() {
this._location = loc;
});
}
}`
D/AmapLocationPugin( 4608): 定位获取结果:0.0 code:7 省:
D/AmapLocationPugin( 4608): 定位获取结果:0.0 code:7 省:
The text was updated successfully, but these errors were encountered: