bottom_sheet 1.0.3 copy "bottom_sheet: ^1.0.3" to clipboard
bottom_sheet: ^1.0.3 copied to clipboard

outdated

Flexible bottom sheet with the ability to scroll content even without a list.

Bottom Sheet #

Build Status Coverage Status Pub Version Pub Likes Pub popularity Flutter Platform

This package is part of the SurfGear toolkit made by Surf.

About #

Custom bottom sheet widget, that can resize by drag and then scroll.

Usage #

Main classes:

  1. FlexibleBottomSheet
  2. BottomSheetRoute and showing methods

Flexible and scrollable bottom sheet.

You can show it if call showFlexibleBottomSheet(), then it will be show as popup like a modal bottom sheet with resize by drag and scrollable.

There are 2 type of BottomSheet:

  1. BottomSheet
  2. StickyBottomSheet

Simple BottomSheet

To show bottomSheet, use :

showFlexibleBottomSheet(
  minHeight: 0,
  initHeight: 0.5,
  maxHeight: 1,
  context: context,
  builder: _buildBottomSheet,
  anchors: [0, 0.5, 1],
);

Widget _buildBottomSheet(
    BuildContext context,
    ScrollController scrollController,
    double bottomSheetOffset,
  ) {
    return SafeArea(
      child: Material(
        child: Container(
          child: ListView(
            ...
          ),
        ),
      ),
    );
  }

Sticky BottomSheet

To show sticky BottomSheet, use:
You should return SliverChildListDelegate from builder !!!

showStickyFlexibleBottomSheet(
      minHeight: 0,
      initHeight: 0.5,
      maxHeight: 1,
      headerHeight: 200,
      context: context,
      backgroundColor: Colors.white,
      headerBuilder: (BuildContext context, double offset) {
        return Container(
          ...
        );
      },
      builder: (BuildContext context, double offset) {
        return SliverChildListDelegate(
          <Widget>[...],
        );
      },
      anchors: [0, 0.5, 1],
    );

Installation #

Add bottom_sheet to your pubspec.yaml file:

dependencies:
  bottom_sheet: ^1.0.0

You can use both stable and dev versions of the package listed above in the badges bar.

Changelog #

All notable changes to this project will be documented in this file.

Issues #

For issues, file directly in the Issues section.

Contribute #

If you would like to contribute to the package (e.g. by improving the documentation, solving a bug or adding a cool new feature), please review our contribution guide first and send us your pull request.

Your PRs are always welcome.

How to reach us #

Please feel free to ask any questions about this package. Join our community chat on Telegram. We speak English and Russian.

Telegram

License #

Apache License, Version 2.0

347
likes
0
pub points
97%
popularity

Publisher

verified publishersurf.ru

Flexible bottom sheet with the ability to scroll content even without a list.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on bottom_sheet