replaceSelectionWithAttributedText method

  1. @override
void replaceSelectionWithAttributedText({
  1. required AttributedText attributedReplacementText,
  2. TextRange? newComposingRegion,
})
override

Replaces the currently selected text with attributedReplacementText and collapses the selection at the end of attributedReplacementText.

To insert text after a caret (collapsed selection), use insertAtCaret.

Implementation

@override
void replaceSelectionWithAttributedText({
  required AttributedText attributedReplacementText,
  TextRange? newComposingRegion,
}) {
  _realController.replaceSelectionWithAttributedText(
    attributedReplacementText: attributedReplacementText,
    newComposingRegion: newComposingRegion,
  );
}