text function

Widget text(
  1. dynamic data, {
  2. double size = 14,
  3. dynamic color = Colors.black,
  4. dynamic weight = FontWeight.w400,
  5. dynamic align = TextAlign.center,
  6. dynamic overflow = false,
  7. dynamic textStyle = GoogleFonts.poppins,
})

Implementation

Widget text(data,
    {double size = 14,
      color = Colors.black,
      weight = FontWeight.w400,
      align = TextAlign.center,
      overflow = false, textStyle = GoogleFonts.poppins}) {
  return Text(
    data,
    overflow: overflow ? TextOverflow.ellipsis : null,
    style: textStyle(
      fontSize: size.sp,
      fontWeight: weight,
      color: color,
    ),
    textAlign: align,
  );
}