SwipingDeck<T extends Widget> class
A deck of Widget objects that can be swiped to the left or right using a gesture or a button.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- SwipingDeck
Constructors
-
SwipingDeck({Key? key, required List<
T> cardDeck, required dynamic onLeftSwipe(T, List<T> , int), required dynamic onRightSwipe(T, List<T> , int), required dynamic onDeckEmpty(), required double cardWidth, double minimumVelocity = 1000, double rotationFactor = .8 / 3.14, double? swipeThreshold, Duration swipeAnimationDuration = const Duration(milliseconds: 500)})
Properties
- animationActive ↔ bool
-
getter/setter pair
-
cardDeck
↔ List<
T> -
The list of Widget objects to be swiped.
getter/setter pair
- cardsSwiped ↔ int
-
getter/setter pair
- cardWidth → double
-
The width of all Widget objects in the cardDeck.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minimumVelocity → double
-
The minimum horizontal velocity required to trigger a swipe.
final
- onDeckEmpty → dynamic Function()
-
Callback function when the last Widget in the cardDeck is swiped.
final
-
onLeftSwipe
→ dynamic Function(T, List<
T> , int) -
Callback function ran when a Widget is swiped left.
final
-
onRightSwipe
→ dynamic Function(T, List<
T> , int) -
Callback function ran when a Widget is swiped right.
final
- rotationFactor → double
-
The amount each Widget rotates as it is swiped.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenSize ↔ Size
-
The Size of the screen.
latefinal
- swipeAnimationDuration → Duration
-
The Duration of the swiping AnimationController
final
- swipeDetector ↔ SwipingGestureDetector
-
The
SwipingGestureDetector
used to control swipe animations.latefinal - swipeThreshold ↔ double?
-
The distance in pixels that a Widget must be dragged before it is swiped.
latefinal
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
-
swipeLeft(
) → Future< void> - Swipe the top Widget to the left.
-
swipeRight(
) → Future< void> - Swipe the top Widget to the right.
-
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