You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When `ErrorText.localizeError` is used, it becomes a single source of truth.
This means all error messages should be localized by developer.
A subset of errors is already localized by Firebase UI, so `localizedErrorText` that is
used internally is now public and could be used inside `ErrorText.localizeError`.
Example:
```dart
ErrorText.localizeError = (BuildContext context, FirebaseAuthException e) {
if (e.code == "user-not-found" || e.code == "wrong-password") return "Wrong credentials";
final defaultLabels = FirebaseUILocalizations.labelsOf(context);
return localizedErrorText(e.code, defaultLabels);
}
```
0 commit comments