ExSwipe class

SwipeTo is a wrapper widget to other Widget that we can swipe horizontally to initiate a callback when animation gets end. It is useful to develop and What's App kind of replay animation for a component of ongoing chat.

Inheritance
Available Extensions

Constructors

ExSwipe({required Widget child, Key? key, GestureDragUpdateCallback? onRightSwipe, GestureDragUpdateCallback? onLeftSwipe, IconData iconOnRightSwipe = Icons.reply, Widget? rightSwipeWidget, IconData iconOnLeftSwipe = Icons.reply, Widget? leftSwipeWidget, double iconSize = 26.0, Color? iconColor, Duration animationDuration = const Duration(milliseconds: 150), double offsetDx = 0.3, int swipeSensitivity = 5})
const

Properties

animationDuration Duration
Duration value to define animation duration if not passed default Duration(milliseconds: 150) will be taken
final
child Widget
Child widget for which you want to have horizontal swipe action @required parameter
final
hashCode int
The hash code for this object.
no setterinherited
iconColor Color?
color value defining color of displayed icon beneath child widget if not specified primaryColor from theme will be taken
final
iconOnLeftSwipe IconData
Icon that will be displayed beneath child widget when swipe left
final
iconOnRightSwipe IconData
Icon that will be displayed beneath child widget when swipe right
final
iconSize double
double value defining size of displayed icon beneath child widget if not specified default size 26 will be taken
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leftSwipeWidget Widget?
Widget that will be displayed beneath child widget when swipe right
final
offsetDx double
Double value till which position child widget will get animate when swipe left or swipe right if not specified 0.3 default will be taken for Right Swipe & it's negative -0.3 will bve taken for Left Swipe
final
onLeftSwipe GestureDragUpdateCallback?
callback which will be initiated at the end of child widget animation when swiped left if not passed swipe to left will be not available
final
onRightSwipe GestureDragUpdateCallback?
callback which will be initiated at the end of child widget animation when swiped right if not passed swipe to right will be not available
final
rightSwipeWidget Widget?
Widget that will be displayed beneath child widget when swipe right
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
swipeSensitivity int
Integer specifying value above which it will sense swipe to get triggerred default minimum value is 20 and maximum value is 35 Putting max value will require use to swipe in short time to get swipe in effect
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _ExSwipeState
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