text method

Text text({
  1. Key? key,
  2. TextAlign? align,
  3. TextStyle? style,
  4. bool? mono,
  5. double? fontSize,
  6. Color? color,
  7. FontWeight? weight,
  8. int? maxLines,
  9. bool? softWrap,
  10. TextOverflow? overflow = TextOverflow.clip,
  11. Locale? locale,
})

Implementation

Text text(
    {Key? key,
    TextAlign? align,
    TextStyle? style,
    bool? mono,
    double? fontSize,
    Color? color,
    FontWeight? weight,
    int? maxLines,
    bool? softWrap,
    TextOverflow? overflow = TextOverflow.clip,
    Locale? locale}) {
  TextStyle? st;
  if (style == null && (fontSize != null || color != null || weight != null || mono == true)) {
    st = TextStyle(fontFeatures: mono == true ? [FontFeature.tabularFigures()] : null, fontSize: fontSize, color: color, fontWeight: weight);
  }
  return Text(this, key: key, style: style ?? st, textAlign: align, overflow: overflow, softWrap: softWrap, maxLines: maxLines, locale: locale);
}