of method

ScrollableState of (BuildContext context)

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

Typical usage is as follows:

ScrollableState scrollable = Scrollable.of(context);

Implementation

static ScrollableState of(BuildContext context) {
  final _ScrollableScope widget = context.inheritFromWidgetOfExactType(_ScrollableScope);
  return widget?.scrollable;
}