BasicText constructor

BasicText(
  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. FontType? fontType,
  14. String? fontFamily,
})

Implementation

BasicText(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,
    FontType? fontType,
    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,
                  fontType: fontType,
                  backgroundColor: backgroundColor,
                  fontSize: fontSize,
                  color: color,
                  fontFamily: fontFamily,
                  height: height)
              .merge(style));