DesignSwipeActions class
child with startActions behind its start edge and endActions behind its end edge.
The frame is the look's. In a list of rows, round the group (clip the list or its card), not the first and last rows: a row slides on its own, so a row with rounded corners shows them where it meets its neighbour. Where a row has rounded corners anyway, underlap runs the actions' strip on under it, so its corners show the strip, not what is behind.
DesignSwipeActions(endActions: [DesignSwipeAction(label: 'Delete', onPressed: () {}, destructive: true)], actionBuilder: (context, action, details) => Text(action.label), child: const Text('Message'))
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DesignSwipeActions
Constructors
-
DesignSwipeActions({Key? key, required Widget child, required DesignSwipeActionBuilder actionBuilder, List<
DesignSwipeAction> startActions = const [], List<DesignSwipeAction> endActions = const [], double actionExtent = 80, bool fullSwipe = true, double fullSwipeFraction = 0.6, ValueChanged<bool> ? onOpenChanged, bool initiallyOpen = false, double underlap = 0, DesignSwipeActionsController? controller, bool closeOnScroll = true, double dampingRatio = 1, double stiffness = 700}) -
A row of
childwith actions.const
Properties
- actionBuilder → DesignSwipeActionBuilder
-
Paints an action.
final
- actionExtent → double
-
Each action's resting width.
final
- child → Widget
-
The row.
final
- closeOnScroll → bool
-
Whether the scroll view it is in scrolling closes it. Defaults to true.
Rows in one scroll view open one at a time either way: opening one
closes the others.
final
- controller → DesignSwipeActionsController?
-
Opens and closes it from outside; the caller's, never disposed here.
final
- dampingRatio → double
-
The slide's spring damping ratio (ζ). Defaults to 1.
final
-
endActions
→ List<
DesignSwipeAction> -
The actions a swipe toward the start shows, the first at the edge.
final
- fullSwipe → bool
-
Whether a swipe past fullSwipeFraction of the row runs the edge
action.
final
- fullSwipeFraction → double
-
How far a full swipe goes, as a share of the row's width.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initiallyOpen → bool
-
Whether it starts with a side open: the end's actions (the start's
when the end has none). A preview, or a one-time hint that the row
swipes; it closes as any open row does.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onOpenChanged
→ ValueChanged<
bool> ? -
Called when a side opens or the row closes.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
startActions
→ List<
DesignSwipeAction> -
The actions a swipe toward the end shows, the first at the edge.
final
- stiffness → double
-
The slide's spring stiffness (k). Defaults to 700.
final
- underlap → double
-
How far the actions' strip runs on under the row, past where it shows:
the innermost action's slot is that much wider (see
DesignSwipeActionDetails.underlap). 0: the strip stops at the row.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DesignSwipeActions> -
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.
override
-
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