of static method

ViewState? of(
  1. BuildContext context
)

Implementation

static ViewState? of(BuildContext context) {
  final MyInheritedWidget widget = context
      .getElementForInheritedWidgetOfExactType<MyInheritedWidget>()!
      .widget as MyInheritedWidget;
  return widget.inViewState;
}