首页 > 解决方案 > Flutter 中的 Google Places API

问题描述

我正在使用 Flutter 开发 Google Places API。我正在通过参考示例来工作。但我得到了谷歌地方 API 类的错误

例如:

未定义的类“GoogleMapsPlaces”。尝试将名称更改为现有类的名称,或创建具有该名称的类

flutter_google_places我在我的飞镖文件中导入了:

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

使用flutter_google_places版本0.2.3

在此处输入图像描述

标签: flutterdartgoogle-places-api

解决方案


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

它在https://pub.dev/packages/google_maps_webservice上可用


推荐阅读