AnimatedList constructor Null safety

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

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

Implementation

const AnimatedList({
  super.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);