of static method

The SfLocalizations from the closest Localizations instance that encloses the given context.

This method is just a convenient shorthand for: Localizations.of(context, SfLocalizations).

References to the localized resources defined by this class are typically written in terms of this method. For example:

String label = SfLocalizations.of(context).noSelectedDateCalendarLabel,

Implementation

static SfLocalizations of(BuildContext context) {
  return Localizations.of<SfLocalizations>(context, SfLocalizations) ??
      const _DefaultLocalizations();
}