Closed jcblancomartinez closed 1 year ago
Hi @matanshukry ,
Could you please take a look at this?
In my opinion, locale should be passed in each of the methods exposed by FlutterGooglePlacesSdkWebPlugin instead of passing it to initialize.
Thanks.
@jcblancomartinez what is your use case? you shouldn't need to create multiple instances of FlutterGooglePlacesSdk
As mentioned above, when users change the locale of our app, we want the results from Google Maps API to consider the current language. i.e. for English, it should show Spain, for Spanish, it should show España...
@jcblancomartinez implemented and released new versions. You now have an updateSettings
method you can use to update the locale after the initial initialization. See https://pub.dev/packages/flutter_google_places_sdk/versions/0.3.2+5
Note:
How come are you resolving it if it is not implemented for iOS?
@jcblancomartinez your issue was for web - that is resolved. I also created a different issue specifically for iOS: https://github.com/matanshukry/flutter_google_places_sdk/issues/27
Hi,
Users can change the locale of our app. When that happens, we make a new call to: FlutterGooglePlacesSdk('keyXXX', locale: Get.locale)
The problem with flutter_google_places_sdk_web is that FlutterGooglePlacesSdkWebPlugin is a singleton and locale is only considered the first time locale is passed.
For subsequent instantiations of FlutterGooglePlacesSdk with different locales to the original one, those locales get ignored.
Thanks.