reusable_bottom_sheet 0.0.2 copy "reusable_bottom_sheet: ^0.0.2" to clipboard
reusable_bottom_sheet: ^0.0.2 copied to clipboard

A reusable Flutter package to easily create customizable bottom sheets with options to display a title, subtitle, child widgets, and a drag handle. It supports features like custom height, background [...]

reusable_bottom_sheet #

A Flutter package to create highly customizable, reusable bottom sheets with features like titles, subtitles, drag gestures (pill indicator), and option lists. Designed to help you create elegant and flexible modal bottom sheets faster.


Features #

  • Fully customizable modal bottom sheets
  • Optional title and subtitle support
  • Optional pill gesture at the top for user interaction hint
  • Scrollable content support
  • Flexible height control
  • Easily show option lists
  • Reusable components: OptionEntity, OptionItem, OptionList, PillGesture

Getting Started #

Add this to your pubspec.yaml:

reusable_bottom_sheet: ^0.0.2

Import the package:

import 'package:reusable_bottom_sheet/reusable_bottom_sheet.dart';

Usage #

Simple Custom Bottom Sheet #

customBottomSheet(
  context: context,
  title: 'Custom Sheet',
  supTitle: 'This is a subtitle',
  child: Text('Your content here'),
);

Showing an Option List Bottom Sheet #

showOptionBottomSheet(
  context: context,
  title: 'Options',
  options: [
    OptionEntity(title: 'Option 1', icon: Icons.ac_unit, onTap: () {}),
    OptionEntity(title: 'Option 2', icon: Icons.access_alarm, onTap: () {}),
  ],
);

Components #

OptionEntity #

Represents an option with an icon, title, and tap handler.

OptionItem #

Widget for a single option item.

OptionList #

Widget to display a list of OptionItems.

PillGesture #

A draggable indicator usually shown at the top of the sheet.


Customization Options #

  • title, supTitle, and their text styles
  • Background color (bgColor)
  • Border radius (borderRadius)
  • Custom child widget
  • Optional pill gesture (hasPillGesture)
  • Control the height with sheetHeightFraction

Example #

Example Screenshot


License #

This project is licensed under the MIT License.


Contributions #

Contributions, issues, and feature requests are welcome! Feel free to submit a pull request or open an issue.


Maintainer #

Made with ❤️ by Shohidul Islam

0
likes
120
points
193
downloads

Publisher

unverified uploader

Weekly Downloads

A reusable Flutter package to easily create customizable bottom sheets with options to display a title, subtitle, child widgets, and a drag handle. It supports features like custom height, background color, border radius, and callback functions, making it ideal for displaying various types of content in a bottom sheet with smooth interactions.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

app_style, equatable, flutter

More

Packages that depend on reusable_bottom_sheet