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.

Implementation

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