FlexibleBottomSheet<T> class
Flexible and scrollable bottom sheet.
This bottom sheet resizing between min and max size, and when size become max start scrolling content. Reduction size available when content scrolled to 0 offset.
minHeight, maxHeight are limits of bounds this widget. For example:
isCollapsible make possible collapse widget and remove from the screen, but you must be carefully to use it, set it to true only if you show this widget with like showFlexibleBottomSheet() case, because it will be removed by Navigator.pop(). If you set isCollapsible true, minHeight must be 0.
The draggableScrollableController that allow programmatically control bottom sheet.
The animationController that controls the bottom sheet's entrance and exit animations. The FlexibleBottomSheet widget will manipulate the position of this animation, it is not just a passive observer.
initHeight - relevant height for init bottom sheet
keyboardBarrierColor - color for the space behind the keyboard
isExpand - should your bottom sheet expand. By default, isExpand is true, which means that the bottom sheet will have the height you specify (initHeight and maxHeight) regardless of the height of the content in it. If isExpand is false, maxHeight and initHeight must be equal, in which case the bottom sheet will calculate its height based on the content, but no more than maxHeight and initHeight. anchors in this case must be null. ShrinkWrap content widget must be true.
bottomSheetColor - bottom sheet color. If you want to make rounded edges, pass a Colors.transparent here, and set the color and border radius of the bottom sheet in the decoration.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FlexibleBottomSheet
Constructors
-
FlexibleBottomSheet({Key? key, PopupRoute<
T> ? route, double minHeight = 0, double initHeight = 0.5, double maxHeight = 1, FlexibleDraggableScrollableWidgetBuilder? builder, FlexibleDraggableScrollableHeaderWidgetBuilder? headerBuilder, FlexibleDraggableScrollableWidgetBodyBuilder? bodyBuilder, bool isCollapsible = false, bool isExpand = true, AnimationController? animationController, List<double> ? anchors, double? minHeaderHeight, double? maxHeaderHeight, Decoration? decoration, VoidCallback? onDismiss, Color? keyboardBarrierColor, Color? bottomSheetColor, BorderRadiusGeometry? bottomSheetBorderRadius, DraggableScrollableController? draggableScrollableController, bool useRootScaffold = true}) -
FlexibleBottomSheet.collapsible({required PopupRoute<
T> route, Key? key, double initHeight = 0.5, double maxHeight = 1, DraggableScrollableController? draggableScrollableController, FlexibleDraggableScrollableWidgetBuilder? builder, FlexibleDraggableScrollableHeaderWidgetBuilder? headerBuilder, FlexibleDraggableScrollableWidgetBodyBuilder? bodyBuilder, bool isExpand = true, AnimationController? animationController, List<double> ? anchors, double? minHeaderHeight, double? maxHeaderHeight, Decoration? decoration, Color? keyboardBarrierColor, Color? bottomSheetColor, bool useRootScaffold = true, BorderRadiusGeometry? bottomSheetBorderRadius})
Properties
-
anchors
→ List<
double> ? -
final
- animationController → AnimationController?
-
final
- bodyBuilder → FlexibleDraggableScrollableWidgetBodyBuilder?
-
final
- bottomSheetBorderRadius → BorderRadiusGeometry?
-
final
- bottomSheetColor → Color?
-
final
- builder → FlexibleDraggableScrollableWidgetBuilder?
-
final
- decoration → Decoration?
-
final
- draggableScrollableController → DraggableScrollableController?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerBuilder → FlexibleDraggableScrollableHeaderWidgetBuilder?
-
final
- initHeight → double
-
final
- isCollapsible → bool
-
final
- isExpand → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- keyboardBarrierColor → Color?
-
final
- maxHeaderHeight → double?
-
final
- maxHeight → double
-
final
- minHeaderHeight → double?
-
final
- minHeight → double
-
final
- onDismiss → VoidCallback?
-
final
-
route
→ PopupRoute<
T> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useRootScaffold → bool
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< FlexibleBottomSheet< T> > -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited