commonText function

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 textHeight,
})

Implementation

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