Slidable class
A widget that can be slid in both direction of the specified axis.
If the direction is Axis.horizontal, this widget can be slid to the left or to the right, otherwise this widget can be slid up or slid down.
By sliding in one of these direction, slide actions will appear.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Slidable
Constructors
-
Slidable({Key? key, required Widget child, required Widget actionPane, List<
Widget> ? actions, List<Widget> ? secondaryActions, double showAllActionsThreshold = 0.5, double actionExtentRatio = _kActionsExtentRatio, Duration movementDuration = _kMovementDuration, Axis direction = Axis.horizontal, bool closeOnScroll = true, bool enabled = true, SlidableDismissal? dismissal, SlidableController? controller, double? fastThreshold}) - Creates a widget that can be slid.
- Slidable.builder({Key? key, required Widget child, required Widget actionPane, SlideActionDelegate? actionDelegate, SlideActionDelegate? secondaryActionDelegate, double showAllActionsThreshold = 0.5, double actionExtentRatio = _kActionsExtentRatio, Duration movementDuration = _kMovementDuration, Axis direction = Axis.horizontal, bool closeOnScroll = true, bool enabled = true, SlidableDismissal? dismissal, SlidableController? controller, double? fastThreshold})
-
Creates a widget that can be slid.
const
Properties
- actionDelegate → SlideActionDelegate?
-
A delegate that builds slide actions that appears when the child has been dragged
down or to the right.
final
- actionExtentRatio → double
-
Relative ratio between one slide action and the extent of the child.
final
- actionPane → Widget
-
The action pane that controls how the slide actions are animated;
final
- child → Widget
-
The widget below this widget in the tree.
final
- closeOnScroll → bool
-
Specifies to close this slidable after the closest Scrollable's position changed.
final
- controller → SlidableController?
-
The controller that tracks the active Slidable and keep only one open.
final
- direction → Axis
-
The direction in which this widget can be slid.
final
- dismissal → SlidableDismissal?
-
A delegate that controls how to dismiss the item.
final
- enabled → bool
-
Whether this slidable is interactive.
final
- fastThreshold → double
-
The threshold used to know if a movement was fast and request to open/close the actions.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- movementDuration → Duration
-
Defines the duration for card to go to final position or to come back to original position if threshold not reached.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondaryActionDelegate → SlideActionDelegate?
-
A delegate that builds slide actions that appears when the child has been dragged
up or to the left.
final
- showAllActionsThreshold → double
-
The offset threshold the item has to be dragged in order to show all actions
in the slide direction.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → SlidableState -
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
Static Methods
-
of(
BuildContext context) → SlidableState? - The state from the closest instance of this class that encloses the given context.