text static method

Text text(
  1. String text, {
  2. double? size,
  3. Color? color,
  4. bool bold = false,
  5. TextOverflow? overflow,
  6. TextAlign? align,
  7. int? maxLines,
  8. bool underline = false,
  9. bool lineThrough = false,
})

Implementation

static Text text(String text,{double? size, Color? color, bool bold = false, TextOverflow? overflow,
  TextAlign? align, int? maxLines, bool underline = false, bool lineThrough = false}) {
  return Text(text, style: TextStyle(color: color ?? Colors.black,
    fontSize: size ?? 16,
    fontWeight: bold ?FontWeight.w600: FontWeight.normal,
    decoration: underline ? TextDecoration.underline : (lineThrough? TextDecoration.lineThrough: TextDecoration.none),
  ), overflow: overflow, textAlign: align??TextAlign.left, maxLines: maxLines,);
}