SwipeActionCell class

@created by 文景睿 2020 年 7月13日

Inheritance

Constructors

SwipeActionCell({required Key key, required Widget child, List<SwipeAction>? trailingActions, List<SwipeAction>? leadingActions, bool isDraggable = true, bool closeWhenScrolling = true, bool firstActionWillCoverAllSpaceOnDeleting = true, SwipeActionController? controller, int? index, Widget selectedIndicator = const Icon(Icons.add_circle, color: Colors.blue), Widget unselectedIndicator = const Icon(Icons.do_not_disturb_on, color: Colors.red), Color? backgroundColor, double editModeOffset = 60, double fullSwipeFactor = 0.75, int deleteAnimationDuration = 400, int openAnimationDuration = 400, int closeAnimationDuration = 400, Curve openAnimationCurve = Curves.easeOutQuart, Curve closeAnimationCurve = Curves.easeOutQuart, Color? selectedForegroundColor})
About key / 关于key
const

Properties

backgroundColor Color?
Background color for cell and def value = Theme.of(context).scaffoldBackgroundColor)
final
child Widget
Your content view
final
closeAnimationCurve Curve
The curve of close animation
final
closeAnimationDuration int
The close animation duration
final
closeWhenScrolling bool
Close actions When you scroll the ListView . default value = true
final
controller SwipeActionController?
The controller to control edit mode 控制器
final
deleteAnimationDuration int
The animation duration of the delete animation.The unit is ms.
final
editModeOffset double
The offset that cell will move when entering the edit mode
final
firstActionWillCoverAllSpaceOnDeleting bool
When deleting the cell the first action will cover all content size with animation.(emm.. just like iOS native effect) def value = true
final
fullSwipeFactor double
The factor describing how far the cell need to be swiped, for swipe to be considered "full" only valid when performsFirstActionWithFullSwipe = true
final
hashCode int
The hash code for this object.
no setterinherited
index int?
The identifier of edit mode
final
isDraggable bool
Indicates that you can swipe the cell or not
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leadingActions List<SwipeAction>?
Actions on leading
final
openAnimationCurve Curve
The curve of open animation
final
openAnimationDuration int
The open animation duration,such as open animation and close animation duration. The unit is ms
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedForegroundColor Color?
The foreground color showing when the cell is selected in edit mode,def value is Colors.black.withAlpha(30)
final
selectedIndicator Widget
When use edit mode,if you select this row,you will see this indicator on the left of the cell.
final
trailingActions List<SwipeAction>?
Actions on trailing
final
unselectedIndicator Widget
It is contrary to selectedIndicator (可以不传,有默认组件)和上面的相反,不说了
final

Methods

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