🐛 [firebase_ui_auth] PhoneInputScreen crashes when locale has no countryCode #9811
Labels
plugin: ui
resolution: fixed
A fix has been merged or is pending merge from a PR.
type: bug
Something isn't working
Bug report
Describe the bug
PhoneInputView crashes when countryCode is null
Steps to reproduce
Steps to reproduce the behavior:
git clone https://github.com/agonhajdari/flutterfire-countrycodecrash.git
flutter run --flavor development --target lib/main_development.dart # only for android configured
Expected behavior
PhoneInputView without errors.
Sample project
https://github.com/agonhajdari/flutterfire-countrycodecrash
Additional context
If countryCode is null then use
WidgetsBinding.instance.platformDispatcher.locale.countryCode
or if that is also null then use first country incountries
.Flutter doctor
Run
flutter doctor
and paste the output below:Click To Expand
Flutter dependencies
Run
flutter pub deps -- --style=compact
and paste the output below:Click To Expand
The text was updated successfully, but these errors were encountered: