AnimatedSize constructor Null safety

const AnimatedSize(
  1. {Key? key,
  2. Widget? child,
  3. AlignmentGeometry alignment,
  4. Curve curve,
  5. required Duration duration,
  6. Duration? reverseDuration,
  7. @Deprecated('This field is now ignored. ' 'This feature was deprecated after v2.2.0-10.1.pre.') TickerProvider? vsync,
  8. Clip clipBehavior}
)

Creates a widget that animates its size to match that of its child.

The curve and duration arguments must not be null.

Implementation

const AnimatedSize({
  Key? key,
  this.child,
  this.alignment = Alignment.center,
  this.curve = Curves.linear,
  required this.duration,
  this.reverseDuration,
  @Deprecated(
    'This field is now ignored. '
    'This feature was deprecated after v2.2.0-10.1.pre.'
  )
  TickerProvider? vsync,
  this.clipBehavior = Clip.hardEdge,
}) : assert(clipBehavior != null),
     super(key: key);