AnimatedList constructor Null safety

const AnimatedList(
  1. {Key? key,
  2. required AnimatedListItemBuilder itemBuilder,
  3. int initialItemCount,
  4. Axis scrollDirection,
  5. bool reverse,
  6. ScrollController? controller,
  7. bool? primary,
  8. ScrollPhysics? physics,
  9. bool shrinkWrap,
  10. EdgeInsetsGeometry? padding,
  11. Clip clipBehavior}
)

Creates a scrolling container that animates items when they are inserted or removed.

Implementation

const AnimatedList({
  Key? key,
  required this.itemBuilder,
  this.initialItemCount = 0,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.controller,
  this.primary,
  this.physics,
  this.shrinkWrap = false,
  this.padding,
  this.clipBehavior = Clip.hardEdge,
}) : assert(itemBuilder != null),
     assert(initialItemCount != null && initialItemCount >= 0),
     super(key: key);