AnimatedBuilder constructor Null safety

const AnimatedBuilder(
  1. {Key? key,
  2. required Listenable animation,
  3. required TransitionBuilder builder,
  4. Widget? child}

Creates an animated builder.

The animation and builder arguments must not be null.


const AnimatedBuilder({
  Key? key,
  required Listenable animation,
  required this.builder,
}) : assert(animation != null),
     assert(builder != null),
     super(key: key, listenable: animation);