Comments (10)
Already you can set country in this package that set in components .
for example set country like France:
components: [Component("country","fr")]
Example:
var googlePlace = GooglePlace("Your-Key"); var risult = await googlePlace.autocomplete.get("1600 Amphitheatre", components: [Component("country","fr")]);
from google_place.
Same.. need feature asap if possible.
from google_place.
@muneebahmad0600 I'm now using this package https://pub.dev/packages/flutter_google_places
.
from google_place.
the documentation and example are both vague in that package. I tried using that package before this one. do u mind sharing the code for prediction listing? its multiple modes are kind of throwing me off a bit.
from google_place.
@muneebahmad0600 you can see full example with null safety of both packages: - https://gist.github.com/rvndsngwn/e2b11f8733e244e477925d7c186bd334
from google_place.
Bro this the same code as the example which doesn't show how to restrict to a country. what I wanted to see was how you restrict the autoCompleteSearch() function to a country. if you are using the different library you mentioned above. please share that code.
from google_place.
Prediction? p = await PlacesAutocomplete.show(
context: context,
apiKey: kGoogleApiKey,
onError: onError,
mode: _mode,
language: "en",
components: [Component(Component.country, "IN")],
);
In components you can specify witch country you allow like:- [Component(Component.country, "IN"),Component(Component.country, "AU"),Component(Component.country, "CA"),],
from google_place.
you can restrict a country from your firebase.
from google_place.
var googlePlace = GooglePlace("Your-Key"); var risult = await googlePlace.autocomplete.get("1600 Amphitheatre", components: [Component("country","fr")]);
Thanks! If you can put this information in the readme it will be very useful.
from google_place.
Instead of using this plugin, I created a utility class for Google places auto complete : https://arkapp.medium.com/flutter-and-google-map-for-beginners-part-1-fdba4ab22148
from google_place.
Related Issues (20)
- FormatException while passing proxy url HOT 2
- Web proxyUrl HOT 5
- flutter web return null value HOT 8
- Optional timeout HOT 2
- Flutter Web - Can't google place autocomplete to work unless using proxy url. HOT 3
- get city name from results HOT 1
- no results when enabling api key restriction (android apps only) HOT 2
- [Questions] Photo Url When get Photo
- cors-anywhere proxy set-up HOT 1
- Locationbias error: Failed assertion: line 42 pos 14: 'point != null && circular != null && rectangular != null': is not true. HOT 1
- AutocompletePrediction.fromJson throws NoSuchMethodError: The method 'map' was called on null. HOT 1
- Not working in android. No error logs or warning. HOT 1
- Getting details from each types in the address_components
- Impossible to sort getNearBySearch() by distance using rankby parameter
- TimeoutException (Future not completed) HOT 1
- Return coordinates
- Place can't be choosen while typing in textfield.
- Android embedding v2.
- Limit Search Results?
- why is it discontinued HOT 3
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 google_place.