AnimatedIcon constructor Null safety

const AnimatedIcon(
  1. {Key? key,
  2. required AnimatedIconData icon,
  3. required Animation<double> progress,
  4. Color? color,
  5. double? size,
  6. String? semanticLabel,
  7. TextDirection? textDirection}
)

Creates an AnimatedIcon.

The progress and icon arguments must not be null. The size and color default to the value given by the current IconTheme.

Implementation

const AnimatedIcon({
  super.key,
  required this.icon,
  required this.progress,
  this.color,
  this.size,
  this.semanticLabel,
  this.textDirection,
}) : assert(progress != null),
     assert(icon != null);