setCustomErrorTranslations method
Sets a custom translation for a specific error key and locale.
If a translation already exists for the given locale and key, it will be overwritten.
Usage:
localizations.setCustomErrorTranslations('fr', PredefinedFormErrorKey(PredefinedFormErrorType.required), 'Ce champ est obligatoire');
Implementation
void setCustomErrorTranslations(
String locale, FormErrorKey key, String message) {
_customTranslations.putIfAbsent(locale, () => {})[key] = message;
}