checkClient method
确保client不为空
Implementation
Future<void> checkClient() async {
if (Platform.isAndroid) {
// 获取上下文, 这里获取的是Application
final context = await android_app_Application.get();
// 创建定位客户端
_androidClient ??= await com_amap_api_location_AMapLocationClient
.create__android_content_Context(context);
} else if (Platform.isIOS) {
_iosClient ??= await AMapLocationManager.create__();
}
}