Txt.c constructor

const Txt.c(
  1. String text,
  2. Color? color, {
  3. Key? key,
  4. TextStyle? style,
  5. StrutStyle? strutStyle,
  6. TextAlign? align,
  7. TextDirection? direction,
  8. Locale? locale,
  9. bool? softWrap,
  10. TextOverflow? overflow,
  11. double? scaleFactor,
  12. int? maxLines,
  13. String? semanticsLabel,
  14. TextWidthBasis? widthBasis,
  15. double? size,
  16. FontWeight? weight,
  17. String? fontFamily,
  18. bool italic = false,
})

Creates a txt widget with determined text color.

If the style argument is null, the text will use the style from the closest enclosing DefaultTextStyle.

The parameters size, weight, fontFamily and italic overrides the style properties.

The text parameter must not be null.

Implementation

const Txt.c(
  this.text,
  this.color, {
  Key? key,
  this.style,
  this.strutStyle,
  this.align,
  this.direction,
  this.locale,
  this.softWrap,
  this.overflow,
  this.scaleFactor,
  this.maxLines,
  this.semanticsLabel,
  this.widthBasis,
  this.size,
  this.weight,
  this.fontFamily,
  this.italic = false,
})  : this.baseStyle = TxtStyle.none,
      super(
        key: key,
      );