【发布时间】:2021-05-24 03:07:24
【问题描述】:
我正在使用google map 和google places 开发一个应用程序。
当我调用PlacesAutocomplete.show() 时,它会给出以下错误消息。 Null check operator used on a null value
-
pubspec.yaml
environment: sdk: ">=2.7.0 <3.0.0" dependencies: google_maps_flutter: ^2.0.5 flutter_polyline_points: ^1.0.0 location: ^4.1.1 flutter_google_places: ^0.3.0 -
打电话
InkWell( onTap: () async { Prediction p = await PlacesAutocomplete.show( context: context, apiKey: GOOGLE_API_KEY, ); }, child: Text("SHOW") ),
提前致谢。
【问题讨论】:
-
能否请您提供Minimal, Reproducible Example 以便我们看看可能导致问题的原因?
-
我刚刚添加了 InkWell 以显示自动完成屏幕。
-
types、components和strictbounds为必填项
标签: flutter google-maps dart