Skip to content
pubscout

bottom_sheet

4.0.4, released 3 years ago by surf.ru

Flexible bottom sheet that can be resized and scrolled.

WASM-ready
$ flutter pub add bottom_sheet
Source repository

What it does

Provides a custom bottom sheet widget that can be resized in response to drag gestures and scrolled even without a list. Includes options for sticky headers and height based on content.

AI-written summary of version 4.0.4, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a bottom sheet that is both draggable and scrollable.
  • You require sticky headers inside your bottom sheet.
  • You want custom anchor points and flexible sizing for bottom sheets.

Skip it when

  • Standard platform modal bottom sheets fulfill all your requirements without extra customization.
  • You do not need drag resizing or custom scrolling behavior.

Strengths

  • Can be resized via drag gestures and scrolled even without a list.
  • Supports sticky headers via `showStickyFlexibleBottomSheet`.
  • Customizable anchors, minimum, initialization, and maximum heights.

Weaknesses

  • Adds an external dependency (`bottom_inset_observer`) for keyboard and inset handling.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

No native configuration steps required.

showFlexibleBottomSheet(
  minHeight: 0,
  initHeight: 0.5,
  maxHeight: 1,
  context: context,
  builder: (context, scrollController, bottomSheetOffset) {
    return Material(
      child: ListView(
        controller: scrollController,
        children: const [ListTile(title: Text('Item'))],
      ),
    );
  },
  anchors: [0, 0.5, 1],
  isSafeArea: true,
);

Alternatives

Packages that do the same job and could replace bottom_sheet.