Skip to content

tempo-riz/persistent_top_sheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Pub Version

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! :)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

 
 
 

Contributors