connectionClosed method

  1. @protected
  2. @override
void connectionClosed()
override

Platform notified framework of closed connection.

TextInputClient should cleanup its connection and finalize editing.

Implementation

@protected
@override
void connectionClosed() {
  if (connection != null && connection!.attached) {
    connection?.connectionClosedReceived();
    connection = null;
    focusNode?.unfocus();
  }
  _imeComposingGlobal = TextRange.empty;
  _imeComposition = null;
  _pendingSelectionReplacement = null;
  _imeMirrorDeleteStart = -1;
  _imeMirrorDeleteLen = 0;
  _imeMirrorDeletedText = '';
  _rawTypedComposingText = '';
  _lastComposingText = '';
  imeCompositionChanged = true;
  _imeCompositionUndoGroup?.end();
  _imeCompositionUndoGroup = null;
}