Comments (5)
@pratik037 you can use this method Geocoder.google(Your_google_key").findAddressesFromCoordinates()
instaded of Geocoder.findAddressesFromCoordinates()
it will work
from flutter_google_places.
I had the same issue. Thanks @ma3az33, it works!
Does anyone know why Geocoder.local.findAddressesFromCoordinates() is not working?
from flutter_google_places.
Code Implementation
class _SearchBarState extends State<SearchBar> {
GoogleMapsPlaces _places = GoogleMapsPlaces(apiKey: apiKey);
@override
Widget build(BuildContext context) {
return FloatingActionButton(
mini: true,
heroTag: "ssearch",
onPressed: () async {
Prediction p =
await PlacesAutocomplete.show(context: context, apiKey: apiKey, mode: Mode.overlay);
displayPrediction(p);
},
child: Icon(Icons.search),
);
}
Future<Null> displayPrediction(Prediction p) async {
if (p != null) {
PlacesDetailsResponse detail =
await _places.getDetailsByPlaceId(p.placeId);
var placeId = p.placeId;
double lat = detail.result.geometry.location.lat;
double lng = detail.result.geometry.location.lng;
var address = await Geocoder.local.findAddressesFromQuery(p.description);
print(lat);
print(lng);
}
}
}
from flutter_google_places.
@pratik037 you can use this method
Geocoder.google(Your_google_key").findAddressesFromCoordinates()
instaded ofGeocoder.findAddressesFromCoordinates()
it will work
Okay, so we can close this issue now.
from flutter_google_places.
It Works for me....!!!!
If issue related with geocoder: ^0.1.1 then just replace with geocoder: ^0.2.1 in pubspec.yaml
from flutter_google_places.
Related Issues (20)
- Method 'cancel' cannot be called on 'Timer?' because it is potentially null HOT 3
- No update possible on pub.dev due to missing rights HOT 11
- "API keys with referer restrictions cannot be used with this API."
- Auto focus on AppBarPlacesAutoCompleteTextField is hardcoded to true
- version solving failed HOT 9
- Add funcitonality to change color of Text in dialog list HOT 1
- bug: error thrown when dialog back button is pressed without entering any text into search bar HOT 7
- are there any planning to add rankby in this?
- Address filtration in autocomplete
- Execution failed for task ':google_api_headers:compileDebugKotlin'. HOT 1
- PlacesAutocomplete: [VERBOSE-2:ui_dart_state.cc(198)] Unhandled Exception: Null check operator used on a null value HOT 2
- The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.40 and higher. HOT 2
- New versions are not published HOT 1
- Place Results not updated
- Update package needed HOT 3
- Add more control to AppBarPlacesAutoCompleteTextField
- FlutterGooglePlacesSdk::call error: UnimplementedError: initialize() has not been implemented. HOT 1
- Because flutter_google_places >=0.3.0 depends on rxdart ^0.26.0 and my proyect depends on rxdart ^0.27.7 HOT 5
- http plugin updation required HOT 5
- package not compatible with http 1.1.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter_google_places.