Skip to content

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