bottom_drawer 0.0.5 copy "bottom_drawer: ^0.0.5" to clipboard
bottom_drawer: ^0.0.5 copied to clipboard

A bottom drawer widget, support customize drawer header and body, support list body, support drag to open and close.

Bottom Drawer for Flutter Pub version #

Bottom Drawer.

DEMO

1. Add dependency #

dependencies:
  bottom_drawer: ^0.0.5
copied to clipboard

2. Import bottom drawer #

import 'package:bottom_drawer/bottom_drawer.dart';
copied to clipboard

3. Use bottom drawer #

Create a bottom drawer controller.

/// create a bottom drawer controller to control the drawer.
BottomDrawerController controller = BottomDrawerController();
copied to clipboard

Build a bottom drawer widget.

/// return a bottom drawer widget.
Widget buildBottomDrawer(BuildContext context) {
  return BottomDrawer(
    /// your customized drawer header.
    header: Container(),
    /// your customized drawer body.
    body: Container(),
    /// your customized drawer header height.
    headerHeight: 60.0,
    /// your customized drawer body height.
    drawerHeight: 180.0,
    /// drawer background color.
    color: Colors.lightBlue,
    /// drawer controller.
    controller: controller,
  );
}
copied to clipboard

Control the bottom drawer.

/// open the bottom drawer.
controller.open();

/// close the bottom drawer.
controller.close();
copied to clipboard

For more information, see the example.

34
likes
150
points
1.51k
downloads

Publisher

unverified uploader

Weekly Downloads

2024.10.02 - 2025.04.16

A bottom drawer widget, support customize drawer header and body, support list body, support drag to open and close.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on bottom_drawer