of<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>> static method

InheritedLocaleData<E, T> of<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>(
  1. BuildContext context
)

Implementation

static InheritedLocaleData<E, T>
    of<E extends BaseAppLocale<E, T>, T extends BaseTranslations<E, T>>(
        BuildContext context) {
  final inheritedWidget =
      context.dependOnInheritedWidgetOfExactType<InheritedLocaleData<E, T>>();
  if (inheritedWidget == null) {
    throw 'Please wrap your app with "TranslationProvider".';
  }
  return inheritedWidget;
}