commonText function
dynamic
commonText(
- dynamic text, {
- dynamic style,
- dynamic color,
- dynamic fontSize,
- dynamic fontWeight,
- dynamic maxLines,
- dynamic letterSpacing,
- dynamic align,
- 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,
),
),
);
}