SliverReorderableList constructor Null safety

const SliverReorderableList(
  1. {Key? key,
  2. required IndexedWidgetBuilder itemBuilder,
  3. ChildIndexGetter? findChildIndexCallback,
  4. required int itemCount,
  5. required ReorderCallback onReorder,
  6. void onReorderStart(
    1. int
    )?,
  7. void onReorderEnd(
    1. int
    )?,
  8. double? itemExtent,
  9. Widget? prototypeItem,
  10. ReorderItemProxyDecorator? proxyDecorator}
)

Creates a sliver list that allows the user to interactively reorder its items.

The itemCount must be greater than or equal to zero.

Implementation

const SliverReorderableList({
  super.key,
  required this.itemBuilder,
  this.findChildIndexCallback,
  required this.itemCount,
  required this.onReorder,
  this.onReorderStart,
  this.onReorderEnd,
  this.itemExtent,
  this.prototypeItem,
  this.proxyDecorator,
}) : assert(itemCount >= 0),
     assert(
       itemExtent == null || prototypeItem == null,
       'You can only pass itemExtent or prototypeItem, not both',
     );