findInAncestors static method

CustomScrollPhysics? findInAncestors(
  1. BuildContext context
)

Returns the CustomScrollPhysics from Scrollable widget most closely associated with the given context.

Implementation

static CustomScrollPhysics? findInAncestors(BuildContext context) {
  final scrollable = context.findAncestorWidgetOfExactType<Scrollable>();
  return findInPhysics(scrollable?.physics);
}