-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Adds support for StepStyle visual property bundle to the Step widget #140825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds support for StepStyle visual property bundle to the Step widget #140825
Conversation
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding flexibility where component parameters are currently hardwired is a good thing; it looks like this PR is on the right track.
You've introduced StepperProperties and StepperStyle. It would be preferable - for simplicity's sake - to just have one bundle of properties. StepperStyle would match the pattern established by ButtonStyle, TextStyle, etc. The StepperStyle class should be fleshed out with methods like copyWith, hashCode, etc, just like ButtonStyle et al. It should have a const constructor and define component default overrides, i.e. all of its properties should be null by default. Non-null StepperStyle properties override the Stepper's internal defaults.
To introduce a StepperStyle class you'll also need to fold in the existing visual parameters, like connectorColor and connectorThickness and explain that the style parameters trump the component parameters.
Adding this many properties is a win for flexibility however developers will need some examples of using them. One or more {@tool dartpad} interactive examples would help with that.
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking pretty close. Just some minor comments about docs and the example.
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to land a few trivial doc changes, but other than that this looks ready to go.
Thanks for the nice contirbution!
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
gspencergoog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cbracken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple small nits!
flutter/flutter@7dc856a...1a2c315 2024-01-14 [email protected] BoxPainter should dispatch creation and disposal events. (flutter/flutter#141526) 2024-01-14 [email protected] Roll Flutter Engine from a0ac66ecaa2b to f20657354d8b (1 revision) (flutter/flutter#141518) 2024-01-13 [email protected] Roll Flutter Engine from b06478b70a2f to a0ac66ecaa2b (1 revision) (flutter/flutter#141498) 2024-01-13 [email protected] Roll Flutter Engine from 205ed6882a8f to b06478b70a2f (3 revisions) (flutter/flutter#141496) 2024-01-13 [email protected] Roll Flutter Engine from b8e5d4776908 to 205ed6882a8f (1 revision) (flutter/flutter#141492) 2024-01-12 [email protected] Roll Flutter Engine from 418c9e918a22 to b8e5d4776908 (7 revisions) (flutter/flutter#141489) 2024-01-12 [email protected] Added newline at end of `.gitignore` files (flutter/flutter#141270) 2024-01-12 49699333+dependabot[bot]@users.noreply.github.com Bump actions/upload-artifact from 4.0.0 to 4.1.0 (flutter/flutter#141480) 2024-01-12 [email protected] Fixed a lot of typos (flutter/flutter#141431) 2024-01-12 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Remove hack from PageView." (flutter/flutter#141479) 2024-01-12 [email protected] Roll Flutter Engine from 01e353544dd7 to 418c9e918a22 (2 revisions) (flutter/flutter#141474) 2024-01-12 [email protected] Roll Flutter Engine from 0ac8215c70ae to 01e353544dd7 (1 revision) (flutter/flutter#141470) 2024-01-12 [email protected] Roll Flutter Engine from ef2cf86c35a5 to 0ac8215c70ae (2 revisions) (flutter/flutter#141464) 2024-01-12 [email protected] unpin web_socket_channel and roll pub packages (flutter/flutter#141424) 2024-01-12 [email protected] FlutterExtension: make fields non-static (flutter/flutter#141463) 2024-01-12 [email protected] [deep link] Update a gradle task to add flag check and intent filter check to the AppLinkSettings (flutter/flutter#141231) 2024-01-12 [email protected] Expose versionCode and versionName from local.properties in FlutterExtension (flutter/flutter#141417) 2024-01-12 [email protected] Roll Flutter Engine from a56f346dbbf9 to ef2cf86c35a5 (1 revision) (flutter/flutter#141456) 2024-01-12 [email protected] When Impeller is enabled for flutter tester choose correct shader target. (flutter/flutter#141391) 2024-01-12 [email protected] Remove hack from PageView. (flutter/flutter#141138) 2024-01-12 [email protected] Roll Flutter Engine from d0f9329c5ce4 to a56f346dbbf9 (6 revisions) (flutter/flutter#141451) 2024-01-12 [email protected] Adds support for StepStyle visual property bundle to the Step widget (flutter/flutter#140825) 2024-01-12 [email protected] Roll Flutter Engine from 44a0a6ee4d39 to d0f9329c5ce4 (1 revision) (flutter/flutter#141435) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Fixes #140770 and #103124
Adds the possibility of passing a height and width to icons. And also a margin for the distance of the lines between the icons.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.