xxs method

Widget xxs(
  1. BuildContext context,
  2. String? text, {
  3. int? maxLines,
  4. TextAlign? textAlign,
  5. Color? color,
  6. double? height,
  7. bool? bold = false,
  8. TextDecoration? decoration,
})

Implementation

Widget xxs(
  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: xxsText,
      height: height ?? textHeight,
      fontWeight: bold! ? semiBoldWeight : regularWeight,
      decoration: decoration ?? TextDecoration.none,
    ),
  );
}