onTransactionEnd method

  1. @override
void onTransactionEnd(
  1. List<EditEvent> edits
)
override

A transaction that was previously started with onTransactionStart has now ended, this Editable should notify interested parties of changes.

Implementation

@override
void onTransactionEnd(List<EditEvent> edits) {
  _isInTransaction = false;

  _selectionNotifier.resumeNotifications();
  if (_latestSelectionChange != null && _didChangeSelectionDuringTransaction) {
    _streamController.sink.add(_latestSelectionChange!);
  }
  _composingRegion.resumeNotifications();
  _isInInteractionMode.resumeNotifications();

  if (_didReset) {
    // Our state was reset (possibly for to undo an operation). Anything may have changed.
    // Force notify all listeners.
    _didReset = false;
    _selectionNotifier.notifyListeners();
    _composingRegion.notifyListeners();
    _isInInteractionMode.notifyListeners();
  }
}