textWidget function
Widget
textWidget(
- dynamic text, {
- Color? color = const Color(0XFF222222),
- Color? backgroundColor,
- double fontSize = 13,
- FontWeight fontWeight = FontWeight.normal,
- int? maxLines,
- TextAlign? textAlign,
- TextOverflow overflow = TextOverflow.ellipsis,
- bool? softWrap,
Implementation
Widget textWidget(
text, {
Color? color = const Color(0XFF222222),
Color? backgroundColor,
double fontSize = 13,
FontWeight fontWeight = FontWeight.normal,
int? maxLines,
TextAlign? textAlign,
TextOverflow overflow = TextOverflow.ellipsis,
bool? softWrap,
}) {
return Text(
'${BZObjectUtil.isEmpty(text) ? '' : text}',
style: TextStyle(
color: color,
fontSize: fontSize.sp,
fontWeight: fontWeight,
backgroundColor: backgroundColor,
),
maxLines: maxLines,
overflow: overflow,
textAlign: textAlign,
softWrap: softWrap,
);
}