StaggeredReorderableView class

guoshijun created this file at 2022/5/7 4:22 下午

可拖拽的不规则图形瀑布流

Inheritance

Constructors

StaggeredReorderableView({Key? key, required List<ReorderableItem> children, required Axis scrollDirection, required Duration duration, required Duration antiShakeDuration, required bool collation, required int columnNum, required double spacing, required bool canDrag, required double forwardRedundancy, required double backwardRedundancy, required double scrollStep, dynamic onReorder(List<int>)?})
const
StaggeredReorderableView.customer({Key? key, required List<ReorderableItem> children, Axis scrollDirection = Axis.vertical, Duration duration = const Duration(milliseconds: 300), Duration antiShakeDuration = const Duration(milliseconds: 100), bool collation = false, int columnNum = 3, double spacing = 5.0, bool canDrag = true, double forwardRedundancy = 40.0, double backwardRedundancy = 40.0, double scrollStep = 10.0, dynamic onReorder(List<int>)?})
创建一个可拖动的不规则图形瀑布流.
const

Properties

antiShakeDuration Duration
防抖时间,默认Duration(milliseconds: 100)
final
backwardRedundancy double
自动滚动冗余偏移量 Axis.vertical 向下; Axis.horizontal 向右;
final
canDrag bool
是否允许拖拽
final
children List<ReorderableItem>
布局的子项 ReorderableItem.id不允许存在重复值 ReorderableItem.trackingNumber不允许存在重复值
final
collation bool
拖拽后变换规则,true为交换,false为插入
final
columnNum int
每行个数,默认3
final
duration Duration
动画时间,默认Duration(milliseconds: 300)
final
forwardRedundancy double
自动滚动冗余偏移量 Axis.vertical 向上; Axis.horizontal 向左;
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onReorder → dynamic Function(List<int>)?
每次交换完会调用此方法,获取排序后的trackingNumber列表
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scrollDirection Axis
布局方向Axis.verticalAxis.horizontal。 默认Axis.vertical,布局为垂直布局。
final
scrollStep double
每次自动滚动长度,默认10.0
final
spacing double
边距
final

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
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