customText function

Widget customText({
  1. required String text,
  2. Color color = AppColor.kDeepBlueColor,
  3. TextAlign textAlign = TextAlign.start,
  4. int? maxLines,
  5. double fontSize = 10,
  6. FontWeight fontWeight = FontWeight.normal,
})

Implementation

Widget customText({
  required String text,
  Color color = AppColor.kDeepBlueColor,
  TextAlign textAlign = TextAlign.start,
  int? maxLines,
  double fontSize = 10,
  FontWeight fontWeight = FontWeight.normal,
}) {
  return Text(
    text,
    textAlign: textAlign,
    maxLines: maxLines,
    overflow: maxLines != null ? TextOverflow.ellipsis : null,
    style: TextStyle(
      color: color,
      fontFamily: "RobotoSerif_28pt",
      fontWeight: fontWeight,
      fontSize: fontSize,
    ),
  );
}