Skip to content

fix: forward TextInputConnection.updateStyle for Flutter 3.44 - #3

Open
MarcelKaeding wants to merge 2 commits into
feature/upgrade-to-latestfrom
fix/flutter-3-44-update-style
Open

fix: forward TextInputConnection.updateStyle for Flutter 3.44#3
MarcelKaeding wants to merge 2 commits into
feature/upgrade-to-latestfrom
fix/flutter-3-44-update-style

Conversation

@MarcelKaeding

Copy link
Copy Markdown

Required to build Superlist on Flutter 3.44 (superlist is upgrading 3.38.3 → 3.44.8).

Problem

Flutter 3.44 moved the body of TextInputConnection.setStyle into a new updateStyle(TextInputStyle) method (flutter/flutter#180436, the web IME style-syncing fix). TextInputConnectionDecorator implements TextInputConnection by forwarding every member, so it no longer satisfies the interface:

lib/src/default_editor/document_ime/document_ime_communication.dart:22:7:
Error: The non-abstract class 'DocumentImeInputClient' is missing implementations
for these members:
 - TextInputConnection.updateStyle

Every test and build touching the editor fails to compile.

Fix

Forward updateStyle like the other members. setStyle is left as-is — the framework’s default implementation now delegates to updateStyle, so behaviour is unchanged on both old and new SDKs.

Notes

Based on 0ee92f3896, the commit Superlist currently locks, so this branch contains nothing but the compile fix. It is one commit behind feature/upgrade-to-latest (c5e54709ac), which touches a different file and merges cleanly.

🤖 Generated with Claude Code

Flutter 3.44 moved the body of TextInputConnection.setStyle into a new
updateStyle(TextInputStyle) method (flutter/flutter#180436, the web IME
style-syncing fix). TextInputConnectionDecorator implements
TextInputConnection by forwarding every member, so it no longer satisfies
the interface and DocumentImeInputClient fails to compile:

  Error: The non-abstract class 'DocumentImeInputClient' is missing
  implementations for these members:
   - TextInputConnection.updateStyle

Forward updateStyle like the other members. setStyle is left as-is; the
framework's default implementation now delegates to updateStyle.

Based on 0ee92f3 (the commit superlist currently locks) so this adds
nothing but the compile fix.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates TextInputConnectionDecorator to remain compatible with Flutter 3.44’s TextInputConnection interface changes by forwarding the newly introduced updateStyle(...) method, unblocking builds/tests that compile against Flutter 3.44.

Changes:

  • Add forwarding implementation for TextInputConnection.updateStyle(TextInputStyle) in the decorator.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

// Flutter 3.44 moved the body of `setStyle` into `updateStyle`, so the
// decorator has to forward it too (see flutter/flutter#180436).
@override
void updateStyle(TextInputStyle style) => client?.updateStyle(style);
@MarcelKaeding

Copy link
Copy Markdown
Author

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, apply the suggestion exactly.

Do not make changes beyond what is described in the linked review thread.

Copilot AI commented Jul 28, 2026

Copy link
Copy Markdown

@copilot Fix the code for all comments in this review thread.

When a review comment includes a suggested change, ap...

Implemented in commit e2073ba. I updated TextInputConnectionDecorator.updateStyle in ime_decoration.dart to avoid a hard dependency on Flutter 3.44 (TextInputStyle) by using a dynamic forwarder, which addresses the compatibility concern from the linked review thread without additional scope 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.

3 participants