spanWithBoldTitle method

Widget spanWithBoldTitle(
  1. dynamic context,
  2. String title,
  3. String text, {
  4. Color? color,
  5. int? maxLines,
  6. double? size,
})

Implementation

Widget spanWithBoldTitle(
  context,
  String title,
  String text, {
  Color? color,
  int? maxLines,
  double? size,
}) {
  return RichText(
    maxLines: maxLines,
    text: TextSpan(
      style: TextStyle(
        fontFamily: Theme.of(context).textTheme.bodyMedium!.fontFamily,
        color: color ?? Theme.of(context).textTheme.bodyMedium!.color,
        fontSize: size ?? DUI.text.regularText,
        fontWeight: DUI.text.regularWeight,
      ),
      children: <TextSpan>[
        TextSpan(
          text: title,
          style: TextStyle(
            fontWeight: DUI.text.semiBoldWeight,
          ),
        ),
        TextSpan(
          text: text,
        )
      ],
    ),
  );
}