buildTextSpan method

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

Traverses the current editing value, splits it based on style, and builds TextSpans If there are no applied spans, it builds a single span containing the editing value's text and the default style

Implementation

@override
TextSpan buildTextSpan({
  required BuildContext context,
  TextStyle? style,
  required bool withComposing,
}) {
  if (selection != _paragraph.selection) {
    _paragraph.updateSelection(selection);
  }
  return TextSpan(style: style, children: _paragraph.buildTextSpans());
}