flutter - Flutter 中的 Google Places API

标签 flutter dart google-places-api

我正在使用 Flutter 开发 google places API。我正在引用 example 工作.但是我得到了 google places API 类的错误

例如:

Undefined class 'GoogleMapsPlaces'. Try changing the name to the name of an existing class, or creating a class with the name

我将 flutter_google_places 导入到我的 dart 文件中:

import 'package:flutter_google_places/flutter_google_places.dart'; 但我仍然遇到所有类的错误。

使用 flutter_google_places 版本 0.2.3

enter image description here

最佳答案

GoogleMapPlaces 可在不同的库中使用,而不是在 flutter_google_places 中...

可在 https://pub.dev/packages/google_maps_webservice 上获得

关于flutter - Flutter 中的 Google Places API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57491700/

相关文章:

flutter - 如何包装包含其他小部件的行而不会在 Flutter 中溢出

flutter - 如何取消选择 flutter 中的单选按钮?

google-maps - 如何使用 Google Places API 搜索特定类型的地点?

android - 更改标题语言 PlacePicker

google-maps - 在不访问某人的 GMB 帐户的情况下查看 Google map 位置是否经过验证/声明的方法

android - 找不到 com.google.firebase-core :17. 0.1:

flutter - 是否可以从 Material 库导入单个文件来访问其私有(private)字段?

google-maps - 未处理的异常:PlatformException(错误,java.lang.IllegalStateException:试图创建一个已经创建的平台 View , View ID:0

flutter - PageView 内部的 GridView 抖动

ios - Flutter ListView 双重弹跳问题