of method Null safety

InViewState? of(
  1. BuildContext context
)

Implementation

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