CardWidget class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CardWidget
Constructors
-
CardWidget.new({Key? key, required ValueNotifier<
double> listenableScale, required ValueNotifier<double> listenablePositionTop, required double positionTop, ValueNotifier<double> ? listenableDismissedAnimation, required CardModel model, required bool draggable, dynamic onCardTap(CardModel)?, double? scale, dynamic onCardDragEnd(CardOrientation)?, dynamic onCardUpdate(Offset)?, CardOrientation dismissOrientation = CardOrientation.both, CardOrientation swipeOrientation = CardOrientation.both, bool opacityChangeOnDrag = false}) -
const
Properties
- dismissOrientation → CardOrientation
-
Direction where the card could be dismissed and removed from the list.
By default is CardOrientation.both
final
- draggable → bool
-
Enable the dragging on the card
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
listenableDismissedAnimation
→ ValueNotifier<
double> ? -
Used for animate the back card dismissed when it was on the top
of the stack.
final
-
listenablePositionTop
→ ValueNotifier<
double> -
Used for animate position when CardStackWidget.animateCardScale is set
on true.
final
-
listenableScale
→ ValueNotifier<
double> -
Used for animate scale when CardStackWidget.animateCardScale is set
on true.
final
- model → CardModel
-
Current card model shown
final
- onCardDragEnd → dynamic Function(CardOrientation)?
-
Function invoked at the end of the drag. The CardOrientation parameter
indicate the dismiss orientation.
final
- onCardTap → dynamic Function(CardModel)?
-
If not null, the function will be invoked on the tap of the card.
final
- onCardUpdate → dynamic Function(Offset)?
-
Function called when this card is moved.
final
- opacityChangeOnDrag → bool
-
Change card opacity on drag (by default is disabled)
final
- positionTop → double
-
Top from the parent
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double?
-
final
- swipeOrientation → CardOrientation
-
Drag direction enabled. By default is CardOrientation.both
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → CardWidgetState -
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, 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