bottom_sheet_bar 1.0.0+1 copy "bottom_sheet_bar: ^1.0.0+1" to clipboard
bottom_sheet_bar: ^1.0.0+1 copied to clipboard

outdated

A toolbar that expands into a bottom sheet

bottom_sheet_bar #

import 'package:bottom_sheet_bar/bottom_sheet_bar.dart';

BottomSheetBar(
    expandedBuilder: (scrollController) => ListView.builder(
        controller: scrollController, 
        itemBuilder: (context, index) => ListTile(title: index.toString()),
        itemCount: 50,
    ),
    collapsed: Text('Collapsed toolbar widget'),
    body: Text('Content overlayed by toolbar and bottom sheet'),
);

BottomSheetBar constructor parameters #

Required

  • Widget body
  • Function(ScrollController) expandedBuilder

Optional

  • Widget collapsed
  • BottomSheetBarController controller
  • Color color default: Colors.white
  • Color backdropColor default: Colors.transparent
  • BorderRadius borderRadius
  • double height default: kToolbarHeight
  • bool isDismissable default: true
  • bool locked default: true
  • Key key

BottomSheetBarController #

A BottomSheetBarController can be used to expand and collapse the bottom sheet programatically, listen for changes, and query the current state of the BottomSheetBar

  • bool get isCollapsed - Returns true if bottom sheet is fully collapsed
  • bool get isExpanded - Returns true if bottom sheet is fully expanded
  • TickerFuture collapse() - Collapse the bottom sheet widget defined by expandedBuilder
  • TickerFuture expand() - Expand the bottom sheet widget defined by expandedBuilder
  • void addListener(Function listener) - Add a listener that is called on every frame of animation
  • void removeListener(Function listener) - Removes a previously added listener
  • void dispose()

Advanced

  • void attach(AnimationController animationController) - Used internally to assign the AnimationController created by BottomSheetBar to the controller. Unless you're using advanced animation techniques, you probably won't ever need to use this method.

Example #

A quick demonstration can be found in the example directory. To run the example:

flutter run example/main.dart

68
likes
0
pub points
87%
popularity

Publisher

verified publisherqrl.app

A toolbar that expands into a bottom sheet

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on bottom_sheet_bar