of method Null safety

ScrollNotificationObserverState? of(
  1. BuildContext context
)

The closest instance of this class that encloses the given context.

If there is no enclosing ScrollNotificationObserver widget, then null is returned.

Implementation

static ScrollNotificationObserverState? of(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<_ScrollNotificationObserverScope>()?._scrollNotificationObserverState;
}