text static method

Widget text({
  1. required String text,
  2. int maxLine = 1,
  3. TextAlign? textAlign,
  4. Color? colorText,
  5. double? fontSize,
  6. double? lineHeight,
  7. TextDecoration? textDecoration,
  8. FontWeight? fontWeight,
  9. TextStyle? style,
})

Implementation

static Widget text({
  required String text,
  int maxLine = 1,
  TextAlign? textAlign,
  Color? colorText,
  double? fontSize,
  double? lineHeight,
  TextDecoration? textDecoration,
  FontWeight? fontWeight,
  TextStyle? style,
}) {
  return Text(
    text,
    maxLines: maxLine,
    textAlign: textAlign,
    overflow: TextOverflow.ellipsis,
    style: style ??
        TextAppStyle.customTextStyle(
          fontSize: fontSize,
          lineHeight: lineHeight,
          color: colorText ?? AppColor.colorDark,
          fontWeight: fontWeight,
          textDecoration: textDecoration,
        ),
  );
}