withBold method

Widget withBold({
  1. void onTap(
    1. int index,
    2. String text
    )?,
})

Boldens text wrapped in asterisks (text). Optional onTap callback.

Implementation

Widget withBold({void Function(int index, String text)? onTap}) {
  return specialText(
    regex: r'\*(.*?)\*',
    onTap: onTap,
    specialStyle: TextStyle(fontWeight: FontWeight.w700),
  );
}