Repository navigation
fix: render the iOS sliding segmented control from Ruby's sliding prop - #93
Merged
AdamMusa merged 2 commits intoNov 2, 2026
Merged
Conversation
Ruby's cupertino_sliding_segmented_button sends the canonical SegmentedButton wire type, so the Cupertino renderer's check for the raw CupertinoSlidingSegmentedButton wire name never matched and every sliding control rendered as the plain segmented control on iOS. Select the sliding control from the declared sliding property instead. Material has no sliding equivalent and keeps rendering SegmentedButton. Clients from before the canonical wire types still send the legacy wire name: the alias table in control_type.dart now carries the properties an alias implies (sliding: true for CupertinoSlidingSegmentedButton), applied when the Control is built, so no renderer branches on a wire name.
This was referenced Oct 29, 2026
Brings in the PRs merged since, so #93 merges; conflicts take the resolution tested on the full merge of the open PRs. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MqfxcsDiEUZngybe9L72JQ
This was referenced Nov 7, 2026
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.
Pairs with AdamMusa/ruflet#61 (Ruby). Not part of the control-core stack: this fixes the legacy renderer first, and the SegmentedButton migration follows on top.
Bug
Since b9e52ff7, Ruby's
cupertino_sliding_segmented_buttonsends the canonicalSegmentedButtonwire type.adaptive_segmented_button.dartselectedCupertinoSlidingSegmentedControlonly when the rawcontrol.type == "CupertinoSlidingSegmentedButton", which no longer matches. Every sliding control therefore rendered on iOS as the plainCupertinoSegmentedControl.Fix
sliding, which the paired Ruby PR declares;cupertino_sliding_segmented_buttondefaults it to true. This follows the owner's rule that renderers branch on the platform and declared props, never on a Material or Cupertino wire name. Material has no sliding equivalent and keeps renderingSegmentedButton;slidingis ignored there.CupertinoSlidingSegmentedButtonwire type.control_type.dartnow has an alias-properties table next to the alias map (CupertinoSlidingSegmentedButton→{sliding: true}).Control.fromMapapplies it withputIfAbsent, so an explicitsliding: falsestill wins. No renderer needs the raw type, and the control-core migration will rely on the same normalization.models/control.dartgains one call infromMap. fix: never crash invoke handlers on nil or missing args #52/fix: fail fast on invoke methods no handler claims #59/fix: fail Window calls when the window state cannot be read #79 edit other regions of that file (imports, fields, invoke), so it merges cleanly.control_type.dartgains the table after the alias map. feat: add SliverAppBar for CustomScrollView #26 only inserts inside the map.Tests
test/widgets/ruby_sliding_segmented_button_test.dart(6):sliding: true: rendersCupertinoSlidingSegmentedControland not the segmented control. Geometry: both segments sit side by side in the sliding track. Tapping "Two" sendschange1.sliding: rendersCupertinoSegmentedControl.sliding: trueand renders the sliding control.sliding: false: wins over the alias.sliding: true: rendersSegmentedButton.team/verify_pr.shwith the paired ruflet branch (RUBY_PKGS="ruflet_core ruflet ruflet_server ruflet_rails"): PASS:flutter test+1127 all passed,flutter analyze lib testno issues;Gate
No open engine PR touches
adaptive_segmented_button.dartor the sliding renderer.