of method

I18nState of (
  1. BuildContext context
)

Attempts to retrieve the closest instance from the tree.

Can return null if none is found.

Implementation

static I18nState of(BuildContext context) {
  final _InheritedI18n widget =
      context.inheritFromWidgetOfExactType(_InheritedI18n);
  return widget?._state;
}