commonText static method

dynamic commonText(
  1. dynamic text, {
  2. dynamic style,
  3. dynamic color,
  4. dynamic fontSize,
  5. dynamic fontWeight,
  6. dynamic maxLines,
  7. dynamic letterSpacing,
  8. dynamic align,
  9. dynamic googleFont,
  10. dynamic textHeight,
})

Implementation

static commonText(text,
    {style,
    color,
    fontSize,
    fontWeight,
    maxLines,
    letterSpacing,
    align,
    googleFont,
    textHeight}) {
  return Text(
    text ?? "null",
    maxLines: maxLines ?? 2,
    textAlign: align ?? TextAlign.start,
    style: googleFont ??
        GoogleFonts.inter(
          textStyle: style ??
              TextStyle(
                height: textHeight ?? 1.0,
                letterSpacing: letterSpacing ?? 0.28,
                color: color ?? CommonColors.black,
                fontSize: fontSize ?? font_15,
                fontWeight: fontWeight ?? FontWeight.w500,
                overflow: TextOverflow.ellipsis,
              ),
        ),
  );
}