TextCaption function

Widget TextCaption(
  1. String texto, {
  2. double? fontSize,
  3. Color? color,
  4. bool shadow = false,
  5. FontWeight? fontWeight,
  6. TextAlign textAlign = TextAlign.start,
  7. int maxlines = MAXLINES,
  8. TextOverflow textOverflow = TextOverflow.ellipsis,
  9. double espacioLetras = 0,
  10. bool isUppercase = false,
})

Implementation

Widget TextCaption(
    String texto, {
      double? fontSize,
      Color? color,
      bool shadow = false,
      FontWeight? fontWeight,
      TextAlign textAlign = TextAlign.start,
      int maxlines = MAXLINES,
      TextOverflow textOverflow = TextOverflow.ellipsis,
      double espacioLetras = 0,
      bool isUppercase = false,
    }) {
  final Color effectiveColor = color ?? COLOR_SUBTEXT;

  return Text(
    isUppercase ? texto.toUpperCase() : texto,
    overflow: textOverflow,
    textAlign: textAlign,
    maxLines: maxlines,
    style: styleCaption(
      size: fontSize,
      fontWeight: fontWeight,
      color: effectiveColor,
    ),
  );
}