buildTextSpan method

  1. @override
TextSpan buildTextSpan({
  1. required BuildContext context,
  2. TextStyle? style,
  3. bool withComposing = false,
})
override

Builds TextSpan from current editing value.

By default makes text in composing range appear as underlined. Descendants can override this method to customize appearance of text.

Implementation

@override
TextSpan buildTextSpan({
  required BuildContext context,
  TextStyle? style,
  bool withComposing = false,
}) {
  final TextSpan originalTextSpan = super.buildTextSpan(
    context: context,
    style: style,
    withComposing: withComposing,
  );

  return getDecoratedTextSpan(
    style: originalTextSpan.style!,
    source: text,
    rules: rules,
    selectable: true,
  );
}