SwipeableStack<D extends SwipeableStackIdentifiable> class
A widget that provides a stack with swipe action.
This widget can be used as a UI for users to like/nope.
The data to be passed to this Widget must inherit from SwipeableStackIdentifiable, so that the data passed to this Widget will be unique, depending on the id.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- SwipeableStack
Constructors
-
SwipeableStack({SwipeableStackController<
D> ? controller, required List<D> dataSet, required SwipeableStackItemBuilder<D> builder, SwipeableStackOverlayBuilder<D> ? overlayBuilder, SwipeCompletionCallback<D> ? onSwipeCompleted, OnWillMoveNext<D> ? onWillMoveNext, double horizontalSwipeThreshold = 0.44, double verticalSwipeThreshold = 0.32, Duration swipeAssistDuration = const Duration(milliseconds: 650), double viewFraction = 0.92, Clip stackClipBehaviour = Clip.hardEdge, Key? key})
Properties
-
builder
→ SwipeableStackItemBuilder<
D> -
Builder for items to be displayed in SwipeableStack.
final
-
controller
→ SwipeableStackController<
D> -
An object to manipulate SwipeableStack.
final
-
dataSet
→ List<
D> -
Data to display as cards.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- horizontalSwipeThreshold → double
-
The threshold for horizontal swipes.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
onSwipeCompleted
→ SwipeCompletionCallback<
D> ? -
Callback called when the Swipe is completed.
final
-
onWillMoveNext
→ OnWillMoveNext<
D> ? -
Callback called just before launching the Swipe action.
final
-
overlayBuilder
→ SwipeableStackOverlayBuilder<
D> ? -
Builder for displaying an overlay on the most foreground card.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackClipBehaviour → Clip
-
Clip behavior of Stack in SwipeableStack.
final
- swipeAssistDuration → Duration
-
How fast should the widget be swiped out of the screen when letting go?
The faster you set this, the faster you're able to swipe another Widget of your stack.
final
- verticalSwipeThreshold → double
-
The threshold for vertical swipes.
final
- viewFraction → double
-
The second child size rate.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _SwipeableStackState< D> -
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