Closed Theunodb closed 3 years ago
This change is now in Flutter beta so really needing a fix.
Please, trying use my fork: https://github.com/hoc081098/flutter_google_places
flutter_google_places:
git:
url: https://github.com/hoc081098/flutter_google_places.git
ref: feature/restricted-api-keys
I am using beta channel. I receive similar error:
./../../.pub-cache/hosted/pub.dartlang.org/flutter_google_places-0.2.6/lib/src/flutter_google_places.dart:74:15: Error: The method 'ancestorStateOfType' isn't defined for the class 'BuildContext'.
in pubspec.yaml: flutter_google_places: ^0.2.6
I made this change:
static PlacesAutocompleteState of(BuildContext context) =>
// context.ancestorStateOfType(const TypeMatcher<PlacesAutocompleteState>());
context.findAncestorStateOfType<PlacesAutocompleteState>();
in c:\src\flutter.pub-cache\hosted\pub.dartlang.org\flutter_google_places-0.2.6\lib\src\flutter_google_places.dart
and it works
I'm still seeing this error, when could I install a fix?
I upgraded flutter_google_places to ^0.2.8 and rxdart to ^0.25.0 and it worked :D
For future release:
If you are in the latest master branch of flutter the ios build fails with this error: