SlidablePanel class

SlidablePanel is a widget that can slide to show actions it can slide along Axis.horizontal or Axis.vertical it can slide to show actions at ActionPosition.pre or ActionPosition.post

Use SlideController to control the sliding of SlidablePanel pre ------------------------- | | pre | child | post | | ------------------------- post

See also:

Inheritance

Constructors

SlidablePanel({Key? key, required Widget child, required SlideController controller, double maxSlideThreshold = 0.6, Axis axis = Axis.horizontal, ActionLayout preActionLayout = const ActionLayout(alignment: ActionAlignment.spaceEvenly, motion: ActionMotion.behind), ActionLayout postActionLayout = const ActionLayout(alignment: ActionAlignment.spaceEvenly, motion: ActionMotion.behind), List<Widget>? preActions, List<Widget>? postActions, VoidCallback? onSlideStart, bool gestureDisabled = false})
const

Properties

axis Axis
axis would be used to determine the direction of sliding
final
child Widget
child would be the main child of the panel its size would be used to layout the actions of SlideActionPanels
final
controller SlideController
controller would be used to open/dismiss the panel, it can also be used to expand/collapse the actions of SlideActionPanels
final
gestureDisabled bool
gestureDisabled would be used to determine whether the panel should be able to slide using gestures if true, users can only slide the panel via SlideController programmatically; if false, users can slide the panel via gestures or SlideController programmatically; defaults to false
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxSlideThreshold double
maxSlideThreshold would be used to determine the max ratio of the panel that can slide, it should be in 0, 1
final
onSlideStart VoidCallback?
invoke when the panel starts to slide as long as there are some actions, onSlideStart would be invoked if provided by providing onSlideStart, you can do some work when the panel starts to slide, e.g., dismiss other SlidablePanels
final
postActionLayout ActionLayout
describe how to layout the actions at ActionPosition.post. defaults to ActionLayout with ActionAlignment.spaceEvenly and ActionMotion.behind
final
postActions List<Widget>?
postActions would be used to show actions at ActionPosition.post. if not provided or empty, the panel would not be able to slide to show actions at ActionPosition.post, since no content could be shown
final
preActionLayout ActionLayout
describe how to layout the actions at ActionPosition.pre. defaults to ActionLayout with ActionAlignment.spaceEvenly and ActionMotion.behind
final
preActions List<Widget>?
preActions would be used to show actions at ActionPosition.pre. if not provided or empty, the panel would not be able to slide to show actions at ActionPosition.pre, since no content could be shown
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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