SliverAnimatedList constructor Null safety

const SliverAnimatedList(
  1. {Key? key,
  2. required AnimatedListItemBuilder itemBuilder,
  3. int initialItemCount}
)

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

Implementation

const SliverAnimatedList({
  Key? key,
  required this.itemBuilder,
  this.initialItemCount = 0,
}) : assert(itemBuilder != null),
     assert(initialItemCount != null && initialItemCount >= 0),
     super(key: key);