AnimatedDefaultTextStyle constructor Null safety

const AnimatedDefaultTextStyle(
  1. {Key? key,
  2. required Widget child,
  3. required TextStyle style,
  4. TextAlign? textAlign,
  5. bool softWrap = true,
  6. TextOverflow overflow = TextOverflow.clip,
  7. int? maxLines,
  8. TextWidthBasis textWidthBasis = TextWidthBasis.parent,
  9. TextHeightBehavior? textHeightBehavior,
  10. Curve curve = Curves.linear,
  11. required Duration duration,
  12. VoidCallback? onEnd}
)

Creates a widget that animates the default text style implicitly.

The child, style, softWrap, overflow, curve, and duration arguments must not be null.

Implementation

const AnimatedDefaultTextStyle({
  super.key,
  required this.child,
  required this.style,
  this.textAlign,
  this.softWrap = true,
  this.overflow = TextOverflow.clip,
  this.maxLines,
  this.textWidthBasis = TextWidthBasis.parent,
  this.textHeightBehavior,
  super.curve,
  required super.duration,
  super.onEnd,
}) : assert(style != null),
     assert(child != null),
     assert(softWrap != null),
     assert(overflow != null),
     assert(maxLines == null || maxLines > 0),
     assert(textWidthBasis != null);