DesignReorderableList<T extends Object> class

A list of items the reader puts in order; onReorder gets an item's place from and its new place to (counted after it left).

The frame is the look's. Round the group (clip the list or its card), not the first and last items: an item moves on its own, so an item with rounded corners carries them into the middle of the list, and the item that takes the end's place has square ones. The gap where a lifted item will land is empty space the list opens, with no placeholder in it; the lifted item is the look's to paint (proxyDecorator).

DesignReorderableList<String>(items: const ['a', 'b'], onReorder: (from, to) {}, labelOf: (item) => item, itemBuilder: (context, item, reorder) => reorder.handle(Text(item)))
Inheritance

Constructors

DesignReorderableList({Key? key, required List<T> items, required void onReorder(int from, int to), required Widget itemBuilder(BuildContext context, T item, DesignReorderItem reorder), required String labelOf(T item), Object keyOf(T item)?, Widget proxyDecorator(Widget child, int index, Animation<double> animation)?, bool longPressToDrag = true, bool shrinkWrap = false, ScrollController? controller, EdgeInsetsGeometry? padding, String movedMessage(String label, int position, int count)?})
A reorderable list of items.
const

Properties

controller → ScrollController?
Its scroll controller. The caller's, who disposes it; null: the list's scroll view makes its own.
final
hashCode → int
The hash code for this object.
no setterinherited
itemBuilder → Widget Function(BuildContext context, T item, DesignReorderItem reorder)
Paints an item; put its handle in DesignReorderItem.handle.
final
items → List<T>
The items, in order.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyOf → Object Function(T item)?
Tells items apart across moves; null: the item itself.
final
labelOf → String Function(T item)
What a screen reader calls an item.
final
longPressToDrag → bool
Whether a long press anywhere on an item drags it.
final
movedMessage → String Function(String label, int position, int count)?
What a screen reader hears after a move; null: DesignLocalizations.reorderableListMovedMessage.
final
onReorder → void Function(int from, int to)
Moves the item at from to to.
final
padding → EdgeInsetsGeometry?
Its padding.
final
proxyDecorator → Widget Function(Widget child, int index, Animation<double> animation)?
Paints the item under the finger while it is dragged.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shrinkWrap → bool
Whether the list is only as tall as its items.
final

Methods

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