diff --git a/lib/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart b/lib/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart index 99f99a7b4..5c45bb53e 100644 --- a/lib/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart +++ b/lib/src/editor/raw_editor/raw_editor_state_text_input_client_mixin.dart @@ -112,19 +112,9 @@ mixin RawEditorStateTextInputClientMixin on EditorState _textInputConnection!.show(); } - TextRange _getComposingRange() { - if (_lastKnownRemoteTextEditingValue != null && - _lastKnownRemoteTextEditingValue?.composing.isValid == true) { - return _lastKnownRemoteTextEditingValue!.composing; - } else if (textEditingValue.composing.isValid == true) { - return textEditingValue.composing; - } else { - return widget.controller.selection; - } - } - void _updateComposingRectIfNeeded() { - final composingRange = _getComposingRange(); + final composingRange = _lastKnownRemoteTextEditingValue?.composing ?? + textEditingValue.composing; if (hasConnection) { assert(mounted); final offset = composingRange.isValid ? composingRange.start : 0;