span method

  1. @override
InlineSpan span(
  1. BuildContext context,
  2. String text,
  3. TextStyle? style,
  4. void onLinkTab(
    1. String url,
    2. String title
    )?,
)
override

Implementation

@override
InlineSpan span(
  BuildContext context,
  String text,
  TextStyle? style,
  final void Function(String url, String title)? onLinkTab,
) {
  var match = exp.firstMatch(text.trim());
  return WidgetSpan(
    // text: "${match?[1]}",
    alignment: PlaceholderAlignment.baseline,
    baseline: TextBaseline.alphabetic,
    child: TexText(
      "${match?[1]}",
      style: style?.copyWith(fontWeight: FontWeight.bold) ??
          const TextStyle(fontWeight: FontWeight.bold),
    ),
    style: style?.copyWith(fontWeight: FontWeight.bold) ??
        const TextStyle(fontWeight: FontWeight.bold),
  );
}