flutter_scroll_bottom_sheet 1.2.1 copy "flutter_scroll_bottom_sheet: ^1.2.1" to clipboard
flutter_scroll_bottom_sheet: ^1.2.1 copied to clipboard

This package provides a flexible bottom sheet, built on top of the flutter_appbar package, that syncs with scroll events instead of relying only on gestures.

Introduction #

This package provides a flexible bottom sheet, built on top of the flutter_appbar package, that syncs with scroll events instead of relying only on gestures.

Preview #

The gif image below may appear distorted and choppy due to compression.

preview

Usage #

This section covers the basic usage of this package and how to integrate it into your application.

How to open? #

To open a bottom sheet, use the BottomSheet.open method with a vertically Scrollable widget like ListView.

Note

The bottom sheet requires a vertically scrollable widget inside to function properly. Without one, it may not behave as expected.

BottomSheet.open(context, ListView.builder(
    padding: EdgeInsets.all(20),
    itemCount: 100,
    itemBuilder: (context, index) {
        return Text("Hello, World!");
    },
));

How to close? #

To close the currently open bottom sheet, use the BottomSheet.close method with the same BuildContext.

BottomSheet.close(context);

How to customize? #

You can customize the behavior and appearance of the bottom sheet by setting the global BottomSheet.config before calling open. This includes initial height, fade animation, color, and layout wrapper.

BottomSheet.config = BottomSheetConfig(
    initialFraction: 0.6,
    fadeInDuration: Duration(seconds: 1),
    fadeInCurve: Curves.ease,
    barrierColor: Colors.red,
    sheetBuilder: ...,
    builder: ...,
);
1
likes
160
points
216
downloads

Publisher

verified publisherttangkong.dev

Weekly Downloads

This package provides a flexible bottom sheet, built on top of the flutter_appbar package, that syncs with scroll events instead of relying only on gestures.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, flutter_appbar

More

Packages that depend on flutter_scroll_bottom_sheet