Get immediate access to this and 4,000+ other videos and books.

Take your career further with a raywenderlich.com Pro subscription. With unlimited access to over 40+ books and 4,000+ professional videos in a single subscription, it’s simply the best investment you can make in your development career.

Customize Your Labels Pro

This video was last updated on Aug 30 2022

While default labels may be right for most apps, you sometimes need to customize the most common labels for your projects. Learn how to edit your labes with a class implementing DefaultLocalizations.

Contributors

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a raywenderlich.com Professional subscription.

There are cases where you might need to change the textField labels of the sign in and sign up screens: this may happen when your app’s language is not English, or when you simply want to customize your labels. THe good news is that you can customize every single label in our screen. Let’s see how to do that:

class LabelOverrides extends DefaultLocalizations { 

 DefaultLocalizations requires an import of the internationalization package, called i10n.dart 

import 'package:flutterfire_ui/i10n.dart'; 
  @override 
  String get emailInputLabel => 'Gimme your email!'; 

  @override 
  String get passwordInputLabel => 'Your password now!'; 

  @override 
  String get signInActionText => 'Enter the club!'; 

  @override 
  String get registerActionText => 'Join the club'; 
localizationsDelegates: [ 
        FlutterFireUILocalizations.withDefaultOverrides(LabelOverrides()), 
], 

Reviews

Comments