我在 flutter 项目中使用地理定位器来获取当前位置,但出现此错误。我在 ios 和 android 文件中添加了所有依赖项仍然收到此错误我不知道为什么 flutter 通道稳定,2.12,
这是我的代码:
Position position = await Geolocato.getCurrentPosition( desiredAccuracy: LocationAccuracy.high);
Run Code Online (Sandbox Code Playgroud)
这是我的错误,我也测试了 android 10、8,但答案相同
Unhandled Exception: MissingPluginException(No implementation found for method getCurrentPosition on channel flutter.baseflow.com/geolocator)
Run Code Online (Sandbox Code Playgroud)
我正在使用地理定位器插件,这里是插件链接:https ://pub.dev/packages/geolocator