I wrote an app that uses google search places. My app used geocoder package to get coordinate of the address. I'm converting my app to use null safety so I am using Geocoder2.
I'm using the function call in the documentation:
fetchGeocoder = await Geocoder2.getCoordinatesFromAddress(
address: "277 Bedford Ave, Brooklyn, NY 11211, USA",
//address: city + "," + state,
googleMapApiKey: AppData().getAPIKey());
fetchGeocoder returns "Request Denied". I store the API key in a custom call. This is retrieved by AppData().getAPIKey().
I am sure the API key is correct because I use the AppData().getAPIKey() in the google place search function call.