Add updateStyle method to TextInputConnectionDecorator#2950
Merged
Conversation
…use local `super_editor`
github-actions Bot
pushed a commit
that referenced
this pull request
Feb 26, 2026
…to TextInputConnectionDecorator (#2950)
7 tasks
tsavo-at-pieces
added a commit
to pieces-app/super_editor
that referenced
this pull request
May 9, 2026
…lutter 3.35-3.40 compat) Upstream commit b422c32 (PR Flutter-Bounty-Hunters#2950, Feb 2026) added: @OverRide void updateStyle(TextInputStyle style) => client?.updateStyle(style); to TextInputConnectionDecorator in anticipation of Flutter's "Deprecate TextInputConnection.setStyle" breaking change (flutter/flutter#180436), which adds TextInputConnection.updateStyle( TextInputStyle) and deprecates setStyle(...). Per docs.flutter.dev/release/breaking-changes/deprecate-text-input- connection-set-style (last updated 2026-03-03), the change is "Landed in version: TBD / In stable release: Not yet." Our pinned Flutter is 3.35.7 (`flutter --version`): - flutter-sdk-3.35.5/packages/flutter/lib/src/services/text_input.dart declares only `void setStyle({...})`. There is no `class TextInputStyle` and no `void updateStyle(...)` on TextInputConnection. - TextInputConnectionDecorator implements TextInputConnection, so the override fails to compile: "TextInputStyle isn't a type" + "method updateStyle isn't defined for the type TextInputConnection". There is no Dart conditional-imports trick that can selectively include an interface override based on host SDK version (conditional imports switch libraries, not class members). Fix: drop the override and replace it with a comment block that: - Explains the upstream origin (PR Flutter-Bounty-Hunters#2950, commits 4703643 / b422c32). - Cites the Flutter breaking-change doc. - Documents restore criteria (when Flutter ships TextInputStyle in stable AND we upgrade past that release). This is a no-op functionally on stable Flutter: setStyle(...) above already covers the entire surviving public API; the framework can't call a method that doesn't exist on the parent class. Tracked as fork divergence #6 in FORK_CHANGES.md, marked as TEMPORARY. Will be re-asserted on each upstream sync until either upstream gates this on a Flutter version constraint or we upgrade past the TextInputStyle-shipping stable release. Refs: #13 (parent merge PR)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copied from @Renzo-Olivares PR:
#2917