![](/img/trans.png)
[英]flutter Unhandled Exception: type 'LatLng' is not a subtype of type 'LatLng'
[英]A question regarding LATLNG package & LatLng type in Flutter
LATLNG 给出参数类型“LatLng”不能分配给参数类型“LatLng”
参数类型“LatLng(LatLng 在 E:\flutter.pub-cache\hosted\pub.dartlang.org\latlong2-0.8.0\lib\latlong\LatLng.dart 中定义)”不能分配给参数类型 'LatLng(其中 LatLng 在 E:\flutter.pub-cache\hosted\pub.dartlang.org\latlong-0.6.1\lib\latlong\LatLng.dart 中定义)'
以下是未使用的已注释掉的依赖项。
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
font_awesome_flutter: ^8.11.0
flutter:
sdk: flutter
firebase_core: ^0.7.0
firebase_analytics: ^7.0.1
firebase_auth: ^0.20.0+1
cloud_firestore: ^0.16.0
firebase_storage: ^7.0.0
readmore: ^2.0.0
google_fonts: ^1.1.1
google_sign_in: "^4.5.1"
flutter_login_facebook: ^0.4.2+3
# mapbox_gl: ^0.10.0
location: ^4.3.0
provider: ^4.3.3
image_picker: ^0.6.7+3
image_cropper: ^1.4.0
shared_preferences: ^0.5.3+4
# geolocator: 6.2.1
intl: ^0.16.1
http: ^0.12.0+2
geocoding: ^2.0.0
# geocoder: ^0.2.1
flutter_map: ^0.12.0
# latlong: ^0.8.0
# geoflutterfire: ^2.2.2
dev_dependencies:
flutter_test:
sdk: flutter
flutter_launcher_icons: ^0.8.1
作为flutter_map
的维护者,您应该这样做:
'flutter_map' 用于自动为您导出此库,但现在不再使用。 此外,Dart 现在建议依赖所有使用的包,无论它们是否被其他人导出。
从 v1.1.1 开始,这已添加到文档网站。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.