SlidingBox class

Inheritance

Constructors

SlidingBox({Key? key, BoxController? controller, double? width, double? minHeight = 200, double? maxHeight = 400, Color? color = Colors.white, BorderRadius? borderRadius = const BorderRadius.only(topLeft: Radius.circular(30), topRight: Radius.circular(30)), BoxStyle? style = BoxStyle.none, Widget? body, Widget bodyBuilder(ScrollController scrollController, double boxPosition)?, ScrollPhysics? physics = const BouncingScrollPhysics(), bool? draggable = true, IconData? draggableIcon = Icons.remove_rounded, Color? draggableIconColor = const Color(0xff9a9a9a), bool? draggableIconVisible = true, Color? draggableIconBackColor = const Color(0x22777777), bool? collapsed = false, Widget? collapsedBody, Curve? animationCurve = Curves.fastOutSlowIn, Duration? animationDuration = const Duration(milliseconds: 100), Backdrop? backdrop, ValueChanged<double>? onBoxSlide, VoidCallback? onBoxClose, VoidCallback? onBoxOpen, VoidCallback? onBoxHide, VoidCallback? onBoxShow, VoidCallback? onSearchBoxHide, VoidCallback? onSearchBoxShow})

Properties

animationCurve Curve?
The animationCurve defines the easier behavior of the box animation.
final
animationDuration Duration?
The animationDuration defines the time for the box animation to complete.
final
backdrop Backdrop?
A Widget that is placed under the box, the value should be filled with the Backdrop object.
final
body Widget?
A widget that slides from minHeight to maxHeight and is placed on the backdrop.
final
bodyBuilder Widget Function(ScrollController scrollController, double boxPosition)?
Provides a ScrollController to attach to a scrollable widget in the box and current box position. If body and bodyBuilder are both non-null, body will be used.
final
borderRadius BorderRadius?
The corners of the sliding box are rounded by this.
final
collapsed bool?
If set to true, the state of the box is collapsed.
final
collapsedBody Widget?
The Widget displayed overtop the box when collapsed. This fades out as the sliding box is opened.
final
color Color?
The color to fill the background of the sliding box.
final
controller BoxController?
It can be used to control the state of sliding box and search box.
final
draggable bool?
Allows toggling of draggability of the sliding box. if set this to false, the sliding box cannot be dragged up or down.
final
draggableIcon IconData?
A Icon Widget that is placed in top of the box. Gets a IconData.
final
draggableIconBackColor Color?
The color to fill the background of the draggableIcon icon. the position of the icon is top of the box.
final
draggableIconColor Color?
The color of the draggableIcon. the position of the icon is top of the box.
final
draggableIconVisible bool?
If set to false, the draggableIcon hides. Use the controller to open and close sliding box by taps.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxHeight double?
The height of the sliding box when fully opened.
final
minHeight double?
The height of the sliding box when fully collapsed.
final
onBoxClose VoidCallback?
This callback is called when the sliding box is fully closed.
final
onBoxHide VoidCallback?
This callback is called when the sliding box is invisible.
final
onBoxOpen VoidCallback?
This callback is called when the sliding box is fully opened.
final
onBoxShow VoidCallback?
This callback is called when the sliding box is visible.
final
onBoxSlide ValueChanged<double>?
This callback is called when the sliding box slides around with position of the box. the position is a double value between 0.0 and 1.0, where 0.0 is fully collapsed and 1.0 is fully opened.
final
onSearchBoxHide VoidCallback?
This callback is called when the search box is invisible.
final
onSearchBoxShow VoidCallback?
This callback is called when the search box is visible.
final
physics ScrollPhysics?
Gets a ScrollPhysic, the physics determines how the scroll view continues to animate after the user stops dragging the scroll view.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
style BoxStyle?
The styles behind of the sliding box that includes shadow, sheet, none.
final
width double?
The width of the sliding box.
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<SlidingBox>
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, int wrapWidth = 65}) 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