BaseText constructor

BaseText(
  1. String? text, {
  2. Key? key,
  3. Color? color,
  4. TextStyle? style,
  5. Color? backgroundColor,
  6. int? maxLines,
  7. double fontSize = 14,
  8. double? height,
  9. double? letterSpacing,
  10. TextOverflow? overflow,
  11. FontWeight? fontWeight,
  12. TextAlign? textAlign,
  13. String? fontFamily,
})

Implementation

BaseText(String? text,
    {super.key,
    Color? color,
    TextStyle? style,
    Color? backgroundColor,
    int? maxLines,
    double fontSize = 14,
    double? height,
    double? letterSpacing,
    TextOverflow? overflow,
    FontWeight? fontWeight,
    super.textAlign,
    String? fontFamily})
    : super(text ?? '',
          maxLines: maxLines == null ? 1 : (maxLines == 0 ? null : maxLines),
          overflow: overflow ??
              (maxLines == 0 ? TextOverflow.clip : TextOverflow.ellipsis),
          style: TStyle(
                  fontWeight: fontWeight,
                  letterSpacing: letterSpacing,
                  backgroundColor: backgroundColor,
                  fontSize: fontSize,
                  color: color,
                  fontFamily: fontFamily,
                  height: height)
              .merge(style));