span method
InlineSpan
span(
- BuildContext context,
- String text,
- TextStyle? style,
- TextDirection textDirection,
- void onLinkTab()?,
override
Implementation
@override
InlineSpan span(
BuildContext context,
String text,
TextStyle? style,
TextDirection textDirection,
final void Function(String url, String title)? onLinkTab,
) {
var match = exp.firstMatch(text.trim());
return WidgetSpan(
alignment: PlaceholderAlignment.baseline,
baseline: TextBaseline.alphabetic,
child: TexText(
"${match?[1]}",
textDirection: textDirection,
style:
(style ?? const TextStyle()).copyWith(fontStyle: FontStyle.italic),
),
style: (style ?? const TextStyle()).copyWith(fontStyle: FontStyle.italic),
);
}