nested_overscroll
A Flutter package that allows nested scrollable widgets to overscroll their parent scrollable widget seamlessly, maintaining smooth scroll behavior and ensuring that parent and child scrollable widgets interact correctly.
Features
- Enables nested
Scrollable
widgets to overscroll their parent scrollable. - Customizable scroll physics for all nested scrollables.
- Supports inertia and touch scrolling animations.
Usage
Wrap your widget with NestedOverscroll to allow nested scrollable widgets to interact with their parent scrollable:
return NestedOverscroll( // wrap your scrollables with NestedOverscroll
child: ListView(
physics: const BouncingScrollPhysics(), // enable scroll effect only here
children: [
SizedBox(
height: 300,
child: PageView(
scrollDirection: Axis.vertical,
children: [
ListView(
children: [
...
],
),
...
],
),
),
SizedBox(
height: 300,
child: ListView(
children: [
SizedBox(
height: 300,
child: PageView(
scrollDirection: Axis.vertical,
children: [
...
],
),
),
...
],
),
),
],
),
);