Open mrcsilverfox opened 1 year ago
@AndreiMisiukevich why the install dependencies failed? Which version of flutter is needed?
@mrcsilverfox it's because of the flutter version the CI is using; you can ignore that.
I also mentioned that in the comments - but the last session token should be set based on the response -which is missing here.
Also see this: #31 fro the corect usage of the tokens, which it doesn't do.
- If you match the web package to the mobile (missing setting the value from the response) - we'll merge.
- If you prefer to go ahead and impleemnt the correct behavior based on the issue - we can merge that too.
Do you think that is enough?
final prom = _svcAutoComplete!.getPlacePredictions(
AutocompletionRequest()
..input = query
..origin = origin == null ? null : core.LatLng(origin.lat, origin.lng)
..types = typeFilterStr == null ? null : [typeFilterStr]
..componentRestrictions = (ComponentRestrictions()..country = countries)
..bounds = _boundsToWeb(locationBias)
..sessionToken = sessionToken
..language = _language,
(results, status) {
if (status == PlacesServiceStatus.OK ||
status == PlacesServiceStatus.ZERO_RESULTS ||
status == PlacesServiceStatus.NOT_FOUND) {
_lastSessionToken = sessionToken;
} else {
log('API_ERROR: $status');
}
},
);
Or we have to use the completer as used in _getDetails
method?
Although I didn't understand why the session token should be set based on the response. Why can't the session token be set in the getSessionToken
method?
@matanshukry Any updates on this PR?
In web implementation session token is never used during the place autocomplete