Skip to content
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

[Suggestion] Currency from locale not working as expected #76

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marlonfrr
Copy link

Hello
In the code snippet shown below, there is no way to get the currency based on local given that when the locale is supported locale.countrycode is not null, so it will not check for the currency. And in a country that is doesn’t have currency support, locale.countrycode will be null, and when trying to check if currency.getLocale().countryCode.toUpperCase() == locale.countryCode.toUpperCase() toUpperCase() will throw because locale.countryCode is null. So the work around for this is to change the condition to be: if (locale != null && locale.countryCode != null).

ern

As described above, when using an unsupported country toUpperCase() was called on null:

toupper

This was found in the lib/model/available_currency.dart file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant