BottomDrawer class
widget that can be dragged up and down like a drawer
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- BottomDrawer
Constructors
-
BottomDrawer({Key? key, double? height, required double expandedHeight, Color backgroundColor = Colors.white, Color handleColor = const Color(0xFFE0E0E0), List<
BoxShadow> ? shadows = const [defaultShadow], double handleSectionHeight = 28, Size handleSize = const Size(40, 4), double cornerRadius = 8, bool autoResizingAnimation = false, Duration resizeAnimationDuration = const Duration(milliseconds: 300), void onReady(DrawerMoveController controller)?, void onHeightChanged(double height)?, void onStateChanged(DrawerState state)?, required Widget builder(DrawerState state, void setState(void ()), BuildContext context)}) -
const
Properties
- autoResizingAnimation → bool
-
if true, the drawer will be auto resized with animation when the height is changed. (when height is null only)
it's cause overflow. so if you want to use this, autoResizingAnimation=kReleaseMode is recommended.
default is false.
final
- backgroundColor → Color
-
background color of the drawer.
default is white.
final
- builder → Widget Function(DrawerState state, void setState(void ()), BuildContext context)
-
builder of the drawer.
DrawerState is the current state of the drawer.
setState
is the setState function of the drawer. it can be used to rebuild the drawer. (and, when height=null, height will be remeasured) context is the context of the drawer.final - cornerRadius → double
-
corner radius of the drawer.
default is 8.
final
- expandedHeight → double
-
expanded height of the drawer.
final
- handleColor → Color
-
color of the handle.
default is #E0E0E0
final
- handleSectionHeight → double
-
height of the handle section.
default is 28.
final
- handleSize → Size
-
size of the handle.
default is 40x4.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
closed height of the drawer.
if null, the height is set to the height of the child widget.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onHeightChanged → (void Function(double height)?)
-
callback when the height is changed.
final
- onReady → (void Function(DrawerMoveController controller)?)
-
callback when the drawer is ready.
you can use DrawerMoveController to control the drawer.
final
- onStateChanged → (void Function(DrawerState state)?)
-
callback when the state is changed.
final
- resizeAnimationDuration → Duration
-
duration of the auto resizing animation.
default is 300ms.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shadows
→ List<
BoxShadow> ? -
shadows of the drawer.
default is defaultShadow.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< BottomDrawer> -
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
Constants
- defaultShadow → const BoxShadow