persistent_top_sheet 1.0.1 copy "persistent_top_sheet: ^1.0.1" to clipboard
persistent_top_sheet: ^1.0.1 copied to clipboard

Add fully customisable top sheets to your flutter app, anchored at the top and controllable via gestures or controller.

Add fully customisable top sheets to your flutter apps, anchored at the top and controllable via gestures or controller.

You need something else ? Feel free to create issues, contribute to this project or to ask for new features on GitHub !

Features #

  • Fully customizable top sheets for any use case.
  • Smooth animations for open, close, and drag interactions.

Demo #

Demo

Getting started #

To get started, add the package to your pubspec.yaml file:

flutter pub add persistent_top_sheet

Then, import the package into your Dart file:

import 'package:persistent_top_sheet/persistent_top_sheet.dart';

Usage #

First create the client with optional parameters

// if you want to use the controller, you can use open(), close() or toggle()
// otherwise you can drag the handle by default
final controller = PersistentTopSheetController();

PersistentTopSheet(
    maxHeight: 500,
    minHeight: 50,
    controller: controller,
    childBuilder: (currentHeight) => SheetBody(currentHeight: currentHeight),
    handleBuilder: (currentHeight) => const DragHandle(),
    onStateChanged: (state) => debugPrint('isOpen: $state'),
);

There is a ready-to-use example in the /example folder.

Additional information #

I created this package for my own needs. Happy to share !

Don't hesitate to ask for new features or to contribute on GitHub !

Support #

If you'd like to support this project, consider contributing here. Thank you! :)

3
likes
160
points
140
downloads

Publisher

verified publisherzealousfoundry.com

Weekly Downloads

Add fully customisable top sheets to your flutter app, anchored at the top and controllable via gestures or controller.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on persistent_top_sheet