Search packages, repositories and app categories

Package detailsv2.1.0

rubber

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

AndroidiOSWebmacOSWindowsLinux
30-day downloads
11K
Likes
356
Pub points
160

Install package

flutter pub add rubber

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

Rubber is a flexible bottom sheet widget for Flutter that offers customizable material-style spring animations. It enables smooth, elastic transitions when expanding or collapsing, enhancing user interaction with responsive and fluid behavior. Ideal for modals, drawers, or any UI element requiring dynamic bottom-up presentation, Rubber supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux. Its animation system is built on Flutter's physics engine, allowing developers to fine-tune bounce effects and responsiveness. The package is lightweight and integrates seamlessly into existing Flutter apps.

Use cases

  • Modal dialogs
  • Interactive drawers
  • Bottom navigation panels
  • Form overlays
  • Dynamic content expanders

Key features

  • Customizable spring animations
  • Elastic drag behavior
  • Cross-platform support
  • Smooth transition physics
  • Easy integration with existing widgets
  • Configurable bounce resistance

Suitable for

  • Developers seeking animated bottom sheets
  • Apps with interactive UI components
  • Designers wanting material-inspired motion
  • Projects targeting multiple platforms
  • Users of Flutter's physics-based animations

Considerations

  • May require tuning for optimal spring feel
  • Not ideal for static or non-interactive sheets
  • Performance depends on animation complexity
  • Limited to bottom sheet use cases
  • Requires understanding of physics parameters

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

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.

Categories

Source repository

Projects using this package