localizedMessage property
String
get
localizedMessage
Displays the error message localized by the L10n system.
The localization key will be 'errors.$namespace.$internalCode.message'.
example: namespace is patapata and internalCode is 000, then
errors:
patapata:
'000':
message: ErrorMessage
If StandardPageWithResult.localizationKey is set on the currently displayed page when this class is created,
you can override the default keys and display page-specific message by creating the following YAML file.
However, if overridableLocalization was set to false when created, the keys will not be overridden.
Example: If StandardPageWithResult.localizationKey is pages.home, then
pages:
home:
errors:
patapata:
'000':
message: Will be displayed
errors:
patapata:
'000':
message: Will not be displayed
Implementation
String get localizedMessage => hasLocalizedMessage
? _localize(_localizeMessageKey, localeMessageData)
: _defaultMessage;