rubber 2.1.0 copy "rubber: ^2.1.0" to clipboard
rubber: ^2.1.0 copied to clipboard

Rubber is an elastic bottom sheet widget with the customizable material spring animation.

Awesome Flutter

An elastic material bottom sheet implementation for Flutter.

Requires Flutter 3.44 or later and Dart 3.12 or later.

This is still an early preview, some behaviors can change or being removed. Every feedback, bug report or feature request is welcome, please send it at the issue tracker

Follow the Quick Start to add it to your project. Is also available the complete example in the repository to preview the library on your device.

Common interaction options can be configured directly on the sheet:

RubberBottomSheet(
  animationController: controller,
  lowerLayer: const MyBackground(),
  upperLayer: const MySheetContent(),
  draggable: true,
  snapThreshold: 0.4,
  minFlingVelocity: 700,
  completeFlingVelocity: 5000,
  scrimColor: Colors.black54,
  onScrimTap: controller.collapse,
);

Use strict bounds when the elastic overscroll effect is not appropriate:

final controller = RubberAnimationController(
  vsync: this,
  duration: const Duration(milliseconds: 250),
  boundsBehavior: RubberAnimationBoundsBehavior.strict,
);

Use controller.addListener(...) to observe the position continuously. Status listeners report direction and boundary transitions (forward, reverse, completed, and dismissed). Pixel bounds are automatically recalculated after size and orientation changes.

356
likes
160
points
9.49k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Rubber is an elastic bottom sheet widget with the customizable material spring animation.

Repository (GitHub)
View/report issues

License

BSD-2-Clause (license)

Dependencies

flutter

More

Packages that depend on rubber