text function
Widget
text(
- dynamic data, {
- double size = 14,
- dynamic color = Colors.black,
- dynamic weight = FontWeight.w400,
- dynamic align = TextAlign.center,
- dynamic overflow = false,
- 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,
);
}