of static method

Finds the ancestor NestedScrollConnectionState from the closest instance of this class that encloses the given context.

Implementation

static NestedScrollConnectionState? of(BuildContext context) {
  return context.findAncestorStateOfType<NestedScrollConnectionState>();
}