Home > Software engineering >  How to customize widgets with FlutterFire UI auth?
How to customize widgets with FlutterFire UI auth?

Time:06-06

I want to customize my flutterfire ui auth screens using localization. With this link: https://firebase.flutter.dev/docs/ui/auth/localization/ , I managed to customize the email and password textfields's labels. Now I want to customize all the other text widgets on the flutterfire ui auth pages. To customize email and password textfields's label, we used

  @override
  String get emailInputLabel => 'Enter your email';

  @override
  String get passwordInputLabel => 'Enter your password';

How can I do that for other texts?

CodePudding user response:

You can customize the other text widgets by overriding the getters for those text widgets. The full list of getters you can override is available in the properties section in the DefaultLocalizations documentation.

For example, to update the phone input label, you override the phoneInputLabel getter like this:

@override
String get phoneInputLabel => 'Enter your phone number';
  • Related