fix: forward TextInputConnection.updateStyle for Flutter 3.44 - #3
fix: forward TextInputConnection.updateStyle for Flutter 3.44#3MarcelKaeding wants to merge 2 commits into
Conversation
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.
There was a problem hiding this comment.
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); |
|
@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. |
Implemented in commit |
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.setStyleinto a newupdateStyle(TextInputStyle)method (flutter/flutter#180436, the web IME style-syncing fix).TextInputConnectionDecoratorimplementsTextInputConnectionby forwarding every member, so it no longer satisfies the interface:Every test and build touching the editor fails to compile.
Fix
Forward
updateStylelike the other members.setStyleis left as-is — the framework’s default implementation now delegates toupdateStyle, 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 behindfeature/upgrade-to-latest(c5e54709ac), which touches a different file and merges cleanly.🤖 Generated with Claude Code