Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

BottomSheetScrollPhysics

A custom scroll physics for modal bottom sheets with nested scroll view.

This BottomSheetScrollPhysics behaves as ClampingScrollPhysics at the top of the scroll and as the default ScrollPhysics on the bottom. This means that on iOS it will behave like ClampingScrollPhysics at the top and BouncingScrollPhysics at the bottom. And on Android, it will behave like ClampingScrollPhysics at the top and at the bottom of the scroll.

Examples

Default ScrollPhysics

Default ScrollPhysics

Bottom Sheet with BottomSheetScrollPhysics

Bottom Sheet with BottomSheetScrollPhysics

Usage

Use BottomSheetScrollPhysics as a physics widget in scrollable widgets.

@override
Widget build(BuildContext context) {
  return CustomScrollView(
    physics: const BottomSheetScrollPhysics(),
    slivers: [
      // ...
    ],
  );
}

Issues

To report your issues, submit them directly in the Issues section on GitHub.


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD


Download this source code for
5 USD

Comments are closed.