customText function

Widget customText(
  1. String text, {
  2. required Color color,
  3. required double fontSize,
  4. FontStyle fontStyle = FontStyle.normal,
  5. FontWeight fontWeight = FontWeight.normal,
  6. TextAlign textAlign = TextAlign.center,
  7. TextDecoration textDecoration = TextDecoration.none,
  8. TextOverflow textOverflow = TextOverflow.clip,
})

Implementation

Widget customText(String text, {required Color color, required double fontSize, FontStyle fontStyle = FontStyle.normal,
  FontWeight fontWeight = FontWeight.normal, TextAlign textAlign = TextAlign.center, TextDecoration textDecoration = TextDecoration.none,
  TextOverflow textOverflow = TextOverflow.clip}) {
  return Text(
    text,
    textAlign: textAlign,
    overflow: textOverflow,
    textScaleFactor: 1.0,
    style: TextStyle(
      color: color,
      fontSize: fontSize,
      fontStyle: fontStyle,
      fontWeight: fontWeight,
      decoration: textDecoration,
    ),
  );
}