xs method
Widget
xs(
- BuildContext context,
- String? text, {
- int? maxLines,
- TextAlign? textAlign,
- Color? color,
- double? height,
- bool? bold = false,
- TextDecoration? decoration,
Implementation
Widget xs(
BuildContext context,
String? text, {
int? maxLines,
TextAlign? textAlign,
Color? color,
double? height,
bool? bold = false,
TextDecoration? decoration,
}) {
return Text(
text ?? '',
textAlign: textAlign ?? TextAlign.start,
maxLines: maxLines,
overflow: maxLines != null ? TextOverflow.ellipsis : null,
style: TextStyle(
fontFamily: Theme.of(context).textTheme.bodyMedium!.fontFamily,
color: color ?? Theme.of(context).textTheme.bodySmall!.color!,
fontSize: xsText,
height: height ?? textHeight,
fontWeight: bold! ? semiBoldWeight : regularWeight,
decoration: decoration ?? TextDecoration.none,
),
);
}