Flutter google_maps_places 搜索后不显示地点

Flutter google_maps_places dont show places after search

在自动完成功能的帮助下,我尝试使用 google 映射地点来搜索地点后得到 lat/lng。

我该如何解决这个问题?


import 'package:flutter/material.dart';
import 'package:flutter_google_places/flutter_google_places.dart';
import 'package:google_maps_webservice/places.dart';
import 'package:geocoder/geocoder.dart';


// Google Api Key
const kGoogleApiKey = "....";

// to get places detail (lat/lng)
GoogleMapsPlaces _places = GoogleMapsPlaces(apiKey: kGoogleApiKey);

class PlaceSearchPage extends StatelessWidget {
  final Color primaryColor, primaryColorAccent;

  PlaceSearchPage({Key key, this.primaryColor, this.primaryColorAccent})
      : super(key: key);


  @override
  Widget build(BuildContext context) => Scaffold(
        backgroundColor: Colors.white,
        body: Container(
          child: Column(children: <Widget>[
            TextField(
              onSubmitted: (s) async {
                Prediction p = await PlacesAutocomplete.show(
                    context: context,
                    apiKey: kGoogleApiKey,
                    mode: Mode.overlay, // Mode.fullscreen
                    language: "de",
                    components: [new Component(Component.country, "de"), new Component(Component.country, "en")]);

我发现了问题 :`( 错误日志 => "You have exceeded your daily request quota for this API. If you did not set a custom daily request quota, verify your project has an active billing account: http://g.co/dev/maps-no-account"

就我而言,我发现我收到消息“未设置结算帐户...”