SlidableDismissal class
A widget that controls how the Slidable is dismissed.
The Slidable widget calls the onDismissed callback either after its size has collapsed to zero (if resizeDuration is non-null) or immediately after the slide animation (if resizeDuration is null). If the Slidable is a list item, it must have a key that distinguishes it from the other items and its onDismissed callback must remove the item from the list.
See also:
- SlidableDrawerDismissal, which creates slide actions that are displayed like drawers while the item is dismissing.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SlidableDismissal
Constructors
-
SlidableDismissal({Key? key, required Widget child, Map<
SlideActionType, double> dismissThresholds = const <SlideActionType, double>{}, VoidCallback? onResize, DismissSlideActionCallback? onDismissed, Duration? resizeDuration = _kResizeDuration, double crossAxisEndOffset = 0.0, SlideActionWillBeDismissed? onWillDismiss, bool closeOnCanceled = false, bool dragDismissible = true}) -
Creates a widget that controls how the Slidable is dismissed.
const
Properties
- child → Widget
-
The widget to show when the Slidable enters dismiss mode.
final
- closeOnCanceled → bool
-
Specifies to close this slidable after canceling dismiss.
final
- crossAxisEndOffset → double
-
Defines the end offset across the main axis after the card is dismissed.
final
-
dismissThresholds
→ Map<
SlideActionType, double> -
The offset threshold the item has to be dragged in order to be considered
dismissed.
final
- dragDismissible → bool
-
Specifies if the widget can be dismissed by sliding.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onDismissed → DismissSlideActionCallback?
-
Called when the widget has been dismissed, after finishing resizing.
final
- onResize → VoidCallback?
-
Called when the widget changes size (i.e., when contracting before being dismissed).
final
- onWillDismiss → SlideActionWillBeDismissed?
-
Called before the widget is dismissed. If the call returns false, the
item will not be dismissed.
final
- resizeDuration → Duration?
-
The amount of time the widget will spend contracting before onDismissed is called.
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