SwipeActionController class

An controller to control the cell's behavior 一个可以控制cell行为的控制器

Constructors

SwipeActionController.new({SelectedIndexPathsChangeCallback? selectedIndexPathsChangeCallback})

Properties

hashCode int
The hash code for this object.
no setterinherited
isEditing ValueNotifier<bool>
edit mode or not 获取是否正处于编辑模式
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedIndexPathsChangeCallback SelectedIndexPathsChangeCallback?
getter/setter pair
selectedSet Set<int>
getter/setter pair

Methods

closeAllOpenCell() → void
You can call this method to close all opening cell without passing controller into cell 你可以不把controller传入cell就可以直接调用这个方法 用于关闭所有打开的cell
deleteCellAt({required List<int> indexPaths}) → void
This method is called of sync internal data model. You still need to call setState after calling this method 这个方法只是为了更新内部数据源,你仍然需要在调用这个方法之后 去调用 setState 来更新你自己的数据源
deselectAll() → void
deselect all cell 取消选择所有的cell
deselectCellAt({required List<int> indexPaths}) → void
Deselect cells (You must pass SwipeActionCell.index attr to your SwipeActionCell 选中一个cell (注意!!!你必须把 index 参数传入cell
getSelectedIndexPaths({bool sorted = false}) List<int>
Get the list of selected cell 's index 拿到选择的cell的索引集合
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openCellAt({required int index, required bool trailing, bool animated = true}) → void
Open a cell programmatically 1.If cell has already opening,nothing will happen ! 2.You can only open one cell,when you open cell use this method,other opening cell will close. 3.If cell is not on screen,nothing will happen ! 利用编程的方式打开一个cell
selectAll({required int dataLength}) → void
select all cell 选择所有的cell
selectCellAt({required List<int> indexPaths}) → void
Select a cell (You must pass SwipeActionCell.index attr to your SwipeActionCell 选中cell (注意!!!你必须把 index 参数传入cell
startEditingMode() → void
start editing
stopEditingMode() → void
stop editing
toggleEditingMode() → void
If it is editing,stop it. If it is not editing, start it
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited