compose method

void compose(
  1. Delta delta,
  2. TextSelection textSelection,
  3. ChangeSource source
)

Implementation

void compose(Delta delta, TextSelection textSelection, ChangeSource source) {
  if (delta.isNotEmpty) {
    document.compose(delta, source);
  }

  textSelection = selection.copyWith(
      baseOffset: delta.transformPosition(selection.baseOffset, force: false),
      extentOffset: delta.transformPosition(selection.extentOffset, force: false));
  if (selection != textSelection) {
    _updateSelection(textSelection, source);
  }

  notifyListeners();
}