-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More options: preselect a currency , and multiselect several currencies #9
Comments
If anyone needs this functionality here is the code for getting user currency by location. It needs the geolocator and Google Maps api for reverse geocoding
|
@giorgio79 I'm not sure what you mean preselected currencies, package dose not keep the selected currency, it only return the selected currency through If you want to show one or more currencies at the top of the list you can use showCurrencyPicker(
context: context,
onSelect: (Currency currency) {
print('Select currency: ${currency.name}');
},
favorite: <String> ['EUR', 'GBP', 'USD'],
); |
Yeah, so if someone selects values and then the app saves it to Firebase or some storage, the next time the user edits the selected currencies, the saved values could be preloaded... |
@giorgio79 the way I handled this on my app was to put the previously selected currency as a favorite, so it shows at the top of the list in a separate box right under the search box. The user can just tap it again right away. |
A preselected currency is possible right now but i have to use an ugly workaround. It would be nice if you could make currencies.dart available through a getter so we could set a new/initial Currency easily. To make clear what preselected means: I have a button that shows a currency, the user can click it and change it to a different currency if he wants to. This button uses the currency_picker Currency class for getting the symbol and to draw the flag. |
Would be nice to have a preselect array option, so one or more currencies can be preselected.
I am working on an app that has a currency selector and do some geolocation magic, and preselect the currency based on user geolocationn https://play.google.com/store/apps/details?id=com.cashtic
Also, the capability to multiselect would be great too.
The text was updated successfully, but these errors were encountered: