Flutter:地图依赖使应用程序崩溃

Flutter : map dependencie crashes the app

我正在尝试将 google map 与 flutter 一起使用,所以我正在使用 dependencie "google_maps_flutter" 版本:“0.5.18” 问题是当我添加下面的行时(在我的 pubsec.yaml 中)-->

google_maps_flutter:^0.5.16 dependecies img

应用程序崩溃。

错误图片如下。我试图查看 15.0.1 和 16.0.1 指的是什么,但我不知道。 error img

很高兴知道: 当我添加上面的行时,会自动添加以下代码。 changes in the pubsec.lock file after adding above line

显然错误出在我的依赖项(pubsec.yaml 文件)中,位置和 google_maps_flutter 似乎不兼容。要么我必须删除一个才能使另一个工作。

编辑:

插件 "geocoder: ^0.1.2" 确实有效。我可以通过输入地址或将经纬度作为参数传递来成功显示位置(纬度和经度)。 地理编码器文档:https://pub.dev/packages/geocoder