bazrafkan / google_place

A new Flutter package for handle google place api
MIT License
84 stars 122 forks source link

JSON Output? #28

Closed francescoprisco closed 2 years ago

francescoprisco commented 3 years ago

Hi, there are a possibility to get json output after select a prediction? I'm using autocomplete function. I'm trying to serialize AutocompletePrediction object without result. I neet json output to send it in http request

bazrafkan commented 2 years ago

I'll implement in the next version

bazrafkan commented 2 years ago

I already add in 0.4.3 version

francescoprisco commented 2 years ago

How i can do it? i've tried jsonEncode on AutocompletePrediction object but i can convert it into a json. i'vre tried to find a method too but i not found it

bazrafkan commented 2 years ago

You have to call getJson function like this:

var googlePlace = GooglePlace("Your-Key"); var risult = await googlePlace.autocomplete.getJson("1600 Amphitheatre");

then try to decode json (you can get help from this document)

francescoprisco commented 2 years ago

can u implement output json on single AutocompletePrediction object? this will be very usefull