build method

  1. @override
TextSpan build(
  1. String data, {
  2. TextStyle? textStyle,
  3. SpecialTextGestureTapCallback? onTap,
})
override

Implementation

@override
TextSpan build(String data,
    {TextStyle? textStyle, SpecialTextGestureTapCallback? onTap}) {
  if (data == '') {
    return TextSpan(text: '', style: textStyle);
  }
  final List<InlineSpan> children = <InlineSpan>[];
  if (regExps.isNotEmpty) {
    buildWithRegExp(
      children: children,
      start: 0,
      data: data,
      copyRegExps: regExps.toList(),
      textStyle: textStyle,
      onTap: onTap,
    );
  }

  return TextSpan(children: children, style: textStyle);
}