Closed huesmiles49 closed 1 year ago
My other attempt to initialize the package doesn't work either. Code:
final places = FlutterGooglePlacesSdk.platform;
places.initialize(FlavorConfig().googlePlacesApiKey);
FindAutocompletePredictionsResponse res =
await places.findAutocompletePredictions(_searchText);
setState(() {
_predictions = res.predictions;
});
@huesmiles49 Looks like something is wrong with the dependencies. Take a look at the example in this project and use it.
If you still have issue, please create a small reproducible example that we can work.
System: Mac - Ventura 13.0.1 Flutter Version: 3.13.0 Platform: Flutter web
I'm unable to reproduce the issue. It seem to happen randomly. This is the first time I'd experience the issue directly. Another time was when the same problem happen to my coworker. So far, we've only seen this issue on Flutter web.
The only way I know to fix this problem is:
dart pub cache clean
Uncaught Exception
in VSCode debuggerTo conclude, I applied the fix mentioned and the package is working again.
@huesmiles49 it sounds like flutter dependencies/caching issues.
But either way glad to hear it's working again!
This is my current code:
final FlutterGooglePlacesSdk _places = FlutterGooglePlacesSdk(FlavorConfig().googlePlacesApiKey);