of static method
The HeraLocalizations
from the closest Localizations instance
that encloses the given context.
If no HeraLocalizations are available in the given context
, this
method throws an exception.
This method is just a convenient shorthand for:
Localizations.of<HeraLocalizations>(context, HeraLocalizations)!
.
References to the localized resources defined by this class are typically written in terms of this method. For example:
label: HeraLocalizations.of(context).editMessageButtonLabel,
Implementation
static HeraLocalizations of(BuildContext context) {
assert(debugCheckHasHeraLocalizations(context));
return Localizations.of<HeraLocalizations>(context, HeraLocalizations)!;
}