AnimatedList constructor

AnimatedList({
  1. Key? key,
  2. required AnimatedListItemBuilder itemBuilder,
  3. int initialItemCount = 0,
  4. required ScrollViewProperties properties,
  5. ScrollPhysics? physics,
  6. bool shrinkWrap = false,
  7. EdgeInsetsGeometry? padding,
  8. Clip clipBehavior = Clip.hardEdge,
})

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

Implementation

AnimatedList({
  Key? key,
  required this.itemBuilder,
  this.initialItemCount = 0,
  required this.properties,
  this.physics,
  this.shrinkWrap = false,
  this.padding,
  this.clipBehavior = Clip.hardEdge,
})  : assert(itemBuilder != null),
      assert(initialItemCount != null && initialItemCount >= 0),
      assert(key is! GlobalKey<material.AnimatedListState>,
          'Ensure that the GlobalKey of the AnimatedListState from the modified_scroll_view import is being passed.'),
      super(key: key);