Closed saleh-aleid closed 2 months ago
class _PhoneFormField extends StatelessWidget { const _PhoneFormField({ required this.controller, required this.locale, }); final PhoneController controller; final Locale locale; @override Widget build(BuildContext context) { return AutofillGroup( child: Localizations.override( context: context, locale: const Locale('ar'), child: Builder( builder: (context) { log(locale.languageCode); return PhoneFormField( autofocus: false, autofillHints: const [AutofillHints.telephoneNumber], controller: controller, focusNode: FocusNode(), isCountryButtonPersistent: true, countrySelectorNavigator: const CountrySelectorNavigator.bottomSheet(), validator: PhoneValidator.compose( [ PhoneValidator.required(context), PhoneValidator.validMobile(context), ], ), ); }, ), ), ); } }