Skip to content

Commit d47aade

Browse files
committed
get country code from platform dispatcher
1 parent 3f66f74 commit d47aade

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/firebase_ui_auth/lib/src/views/phone_input_view.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ class _PhoneInputViewState extends State<PhoneInputView> {
9090
@override
9191
Widget build(BuildContext context) {
9292
final l = FirebaseUILocalizations.labelsOf(context);
93-
final countryCode = Localizations.localeOf(context).countryCode;
93+
final countryCode = Localizations.localeOf(context).countryCode ??
94+
WidgetsBinding.instance.platformDispatcher.locale.countryCode;
9495

9596
return AuthFlowBuilder<PhoneAuthController>(
9697
flowKey: widget.flowKey,

0 commit comments

Comments
 (0)