Reorderable constructor
const
Reorderable({
- required Key key,
- ReorderableBuilder? builder,
- Widget? child,
Creates a reorderable widget that must be the parent of every item in an ImplicitlyAnimatedReorderableList.
A key
must be specified that uniquely identifies this Reorderable
in the list. The value of the key should not change throughout
the lifecycle of the item. For example if your item has a unique id,
you could use that with a ValueKey
.
Either builder or child must be specified. The builder can be used for custom animations when the item should be animated between dragged and normal state. If you don't want to show any animation between dragged and normal state, you can also use the child as a shorthand instead.
Implementation
const Reorderable({
required Key key,
this.builder,
this.child,
}) : assert(builder != null || child != null),
super(key: key);