ReorderableList constructor

const ReorderableList({
  1. Key? key,
  2. required ScrollViewProperties properties,
  3. required IndexedWidgetBuilder itemBuilder,
  4. required int itemCount,
  5. required ReorderCallback onReorder,
  6. void onReorderStart(
    1. int index
    )?,
  7. void onReorderEnd(
    1. int index
    )?,
  8. double? itemExtent,
  9. Widget? prototypeItem,
  10. ReorderItemProxyDecorator? proxyDecorator,
  11. EdgeInsetsGeometry? padding,
  12. ScrollPhysics? physics,
  13. bool shrinkWrap = false,
  14. double anchor = 0.0,
  15. double? cacheExtent,
  16. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  17. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  18. String? restorationId,
  19. Clip clipBehavior = Clip.hardEdge,
})

Creates a scrolling container that allows the user to interactively reorder the list items.

The itemCount must be greater than or equal to zero.

Implementation

const ReorderableList({
  Key? key,
  required this.properties,
  required this.itemBuilder,
  required this.itemCount,
  required this.onReorder,
  this.onReorderStart,
  this.onReorderEnd,
  this.itemExtent,
  this.prototypeItem,
  this.proxyDecorator,
  this.padding,
  this.physics,
  this.shrinkWrap = false,
  this.anchor = 0.0,
  this.cacheExtent,
  this.dragStartBehavior = DragStartBehavior.start,
  this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  this.restorationId,
  this.clipBehavior = Clip.hardEdge,
})  : assert(itemCount >= 0),
      assert(
        itemExtent == null || prototypeItem == null,
        'You can only pass itemExtent or prototypeItem, not both',
      ),
      super(key: key);