Widget.defaultTextStyle constructor Null safety

const Widget.defaultTextStyle(
  1. {Key? key,
  2. required TextStyle style,
  3. TextAlign? textAlign,
  4. @Default(true) bool softWrap,
  5. @Default(TextOverflow.clip) TextOverflow overflow,
  6. int? maxLines,
  7. @Default(TextWidthBasis.parent) TextWidthBasis textWidthBasis,
  8. TextHeightBehavior? textHeightBehavior,
  9. required Widget child}
)

Implementation

const factory Widget.defaultTextStyle({
  Key? key,
  required TextStyle style,
  TextAlign? textAlign,
  @Default(true) bool softWrap,
  @Default(TextOverflow.clip) TextOverflow overflow,
  int? maxLines,
  @Default(TextWidthBasis.parent) TextWidthBasis textWidthBasis,
  TextHeightBehavior? textHeightBehavior,
  required Widget child,
}) = DefaultTextStyle;