Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

copywith9
Copy link

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.
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.

1 participant