Skip to content

Fix PlatformException(Bad Arguments, Could not set client, view ID is null., null, null)#88

Closed
ghost wants to merge 1 commit into
mainfrom
unknown repository
Closed

Fix PlatformException(Bad Arguments, Could not set client, view ID is null., null, null)#88
ghost wants to merge 1 commit into
mainfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jun 9, 2025

Copy link
Copy Markdown

PlatformException error on flutter version 3.32.0
#83

mast3rmindx referenced this pull request in mast3rmindx/re-editor Jun 9, 2025
This commit applies a fix from upstream commit d448e01d8ff25081209d1ac7d1058503251670f6
(from reqable/re-editor PR #88).

The main change is to provide a valid `viewId` when establishing the
TextInputConnection in `_CodeInputController._openInputConnection()`.
This is done by retrieving the `viewId` using
`ui.PlatformDispatcher.instance.implicitView?.viewId ?? View.maybeOf(_editorKey!.currentContext!)?.viewId;`
and passing it to the `TextInputConfiguration`.

This change is intended to resolve a `PlatformException(Bad Arguments, Could not set client, view ID is null., null, null)`
that could occur when the text input system was initialized without a viewId.
@karniv00l

Copy link
Copy Markdown

This fixes windows, thanks! Can we have this reviewed and merged please?

@MegatronKing

Copy link
Copy Markdown
Member

Thanks for this PR. There was a break change in TextInputConfiguration, see flutter/flutter@42988d1. Merging this PR requires raising the minimum Flutter version.

@MegatronKing

Copy link
Copy Markdown
Member

I have committed a commit to fix this issue, please see a312927. Theoretically, there will be no breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants