of static method

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

Typical usage:

StickyHeaderController controller = DefaultStickyHeaderController.of(context);

Implementation

static StickyHeaderController? of(BuildContext context) {
  final _StickyHeaderControllerScope? scope = context
      .dependOnInheritedWidgetOfExactType<_StickyHeaderControllerScope>();
  return scope?.controller;
}