Repository navigation
feat: add Stepper control - #25
Merged
Merged
Conversation
Render Ruby stepper with Flutter's Stepper on Material and a hand-built Cupertino stepper (24 px numbered circles, hairline connectors, CupertinoButton continue/cancel) on Apple platforms. The stepper is controlled by Ruby: step_tap, step_continue and step_cancel carry indexes and Dart never moves current_step itself.
StepperStep read the Step's keys through a field called `control`, which the wire-key audit attributes to the Stepper itself. Rename it to stepControl; no behavior change.
AdamMusa
pushed a commit
that referenced
this pull request
Nov 2, 2026
Brings in the PRs merged since (#25-#75) so #76 merges cleanly. 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.
Adds the
Steppercontrol and itsStepchild type (Work Package F, item F1).Ruby counterpart: AdamMusa/ruflet#41
Rendering
It follows the three-file adaptive pattern, plus one design-neutral model file:
adaptive_stepper.dartdispatches throughPlatformControlRenderer. It wraps the result inLayoutControland renders anErrorControlfor invalid data:Step(the message points tostepper_step);type: horizontalwithout a bounded height. Both designs give the content anExpandedbody, so this case says "Stepper(type: horizontal) needs a bounded height", with the hint "Set height or expand".stepper_steps.dartis design-neutral (it importswidgets.dartonly). It holds:steps, then block children incontrols; hidden steps are skipped;StepperStepStateenum, which the Cupertino side needs becauseStepStateis Material-only;current_stepclamping;material_stepper.dart) uses Flutter'sStepper/Step.controlsBuilderrendersFilledButton(continue_text)andTextButton(cancel_text). The labels default toMaterialLocalizations, and each button is disabled when its Ruby handler is absent.show_controls: falsegivesSizedBox.shrink().ClampingScrollPhysicsis set.cupertino_stepper.dart) is hand-built from Cupertino and widgets-layer widgets only, with no Material, per D-7.secondaryLabel.primaryColorwhen active or complete,systemGrey3otherwise, andsystemRedon error.CupertinoIcons.checkmark(complete),pencil(editing) orexclamationmark(error).CupertinoColors.separatorconnector runs at x = 12.AnimatedSize, followed byCupertinoButton.filled(continue_text)andCupertinoButton(cancel_text). Cancel usesCupertinoLocalizationsand Continue defaults to "Continue".Expandedhairlines, with titles centred and ellipsised under the circles, then the current content in anExpandedListView.AnimatedCrossFadekeeps hidden bodies mounted.GestureDetector. They are skipped when there is no handler, when the step isdisabled, or when the control is disabled.Second commit (
refactor: name the Step child control explicitly in the stepper model).StepperStepnow reads the Step's keys through a field calledstepControlinstead ofcontrol. The updated wire-key audit treats anycontrol.get*read as a read of the registered Stepper, so it reportedtitle,subtitle,content,state,is_activeandlabelas Stepper keys that Ruby lacks. Behaviour is unchanged.The Ruby PR also stops registering a bare
stepkey (D-6), so the Step child is reachable only asstepper_step/stepperstep. The wire type is stillStep, so this renderer needs no change for that.Wire keys and events
Stepper:
steps(falls back tocontrols),current_step,type(vertical/horizontal),show_controls,continue_text,cancel_text,elevation(Material horizontal header only),connector_color(colour or state map, resolved withselectedwhen active anddisabledotherwise, also colours the circles as in Flutter),connector_thickness,clip_behavior, plus the common layout keywords.Step:
title(String or Control),subtitle,content,state(indexed|editing|complete|disabled|error, camelCase or snake_case),is_active,label(horizontal only).on_step_tapstep_tapon_step_continuestep_continuecurrent_step(int); button disabled without handleron_step_cancelstep_cancelcurrent_step(int); button disabled without handlerThe stepper is controlled. Dart never changes
current_step; Ruby does, withpage.update(wizard, current_step: n).Stepis a child type only (R3), so it has nocreateWidgetcase.Tests
test/widgets/ruby_stepper_test.dart, 31 tests on iOS (Cupertino) and Android (Material). They check:current_stepupdates from Ruby;step_tap1, and the tap alone does not move the stepper;step_continueandstep_cancelwith the current step, and their buttons sit below the content;show_controls: falsehides the buttons;StepState;ErrorControl;elevationandclip_behaviorare passed through;current_stepclamps, and the step list can grow;controlsworks as a fallback;ErrorControl;Stepper, covered on all 5 platforms.verify_pr.shwith Flutter 3.41.2, re-run after both commits with the Ruby pair onRUBY_PKGS="ruflet_core ruflet_rails": +731: All tests passed! (baseline 695).flutter analyze lib testreports No issues found!. The wire-key audit shows 0 new findings under the key-based comparison: Stepper and Step have every key read and every event fired.elevationis Material-only. It only affects Flutter's horizontal Material header.