onScroll property
Called on every scroll update with the live offset and the user's scroll direction — e.g. so a parent can collapse a header while scrolling down and restore it near the top.
Implementation
final void Function(double offset, ScrollDirection direction)? onScroll;