Fix: Active step fully colored in vertical mode#173152
Merged
auto-submit[bot] merged 2 commits intoflutter:masterfrom Aug 26, 2025
Merged
Fix: Active step fully colored in vertical mode#173152auto-submit[bot] merged 2 commits intoflutter:masterfrom
auto-submit[bot] merged 2 commits intoflutter:masterfrom
Conversation
dc7d08c to
68788e5
Compare
Contributor
There was a problem hiding this comment.
Code Review
The pull request introduces a fix to ensure that the active step in a vertical stepper has a fully colored connector line. A new test case has been added to validate this behavior. One suggestion is to improve the test case by using named constants for colors.
Comment on lines
+1640
to
+1685
| testWidgets('Vertical stepper active step has fully colored connector line', ( | ||
| WidgetTester tester, | ||
| ) async { | ||
| await tester.pumpWidget( | ||
| MaterialApp( | ||
| home: Scaffold( | ||
| body: Center( | ||
| child: Stepper( | ||
| controlsBuilder: (_, _) => const SizedBox.shrink(), | ||
| connectorThickness: 3, | ||
| connectorColor: MaterialStateProperty.resolveWith<Color>( | ||
| (Set<MaterialState> states) => states.contains(MaterialState.selected) | ||
| ? const Color(0xFF2196F3) | ||
| : const Color(0xFF9E9E9E), | ||
| ), | ||
| steps: const <Step>[ | ||
| Step(title: Text('step1'), content: Text('step1 content'), isActive: true), | ||
| Step(title: Text('step2'), content: Text('step2 content')), | ||
| ], | ||
| ), | ||
| ), | ||
| ), | ||
| ), | ||
| ); | ||
|
|
||
| final Finder connectorLines = find.byWidgetPredicate( | ||
| (Widget widget) => | ||
| widget is ColoredBox && | ||
| widget.child is SizedBox && | ||
| (widget.child! as SizedBox).width == 3.0, | ||
| ); | ||
|
|
||
| expect(connectorLines, findsWidgets); | ||
|
|
||
| final List<ColoredBox> lineWidgets = tester.widgetList<ColoredBox>(connectorLines).toList(); | ||
| final List<Color> colors = lineWidgets.map((ColoredBox box) => box.color).toList(); | ||
| // Both top and bottom box should be colored. | ||
| expect(colors.where((Color c) => c == const Color(0xFF2196F3)).length, equals(2)); | ||
| }); |
Contributor
There was a problem hiding this comment.
Consider defining the colors used in this test as named constants to improve readability and maintainability. This aligns with the style guide's emphasis on code clarity.1
const Color activeColor = Color(0xFF2196F3);
const Color inactiveColor = Color(0xFF9E9E9E);
await tester.pumpWidget(
MaterialApp(
home: Scaffold(
body: Center(
child: Stepper(
controlsBuilder: (_, _) => const SizedBox.shrink(),
connectorThickness: 3,
connectorColor: MaterialStateProperty.resolveWith<Color>(
(Set<MaterialState> states) => states.contains(MaterialState.selected)
? activeColor
: inactiveColor,
),
steps: const <Step>[
Step(title: Text('step1'), content: Text('step1 content'), isActive: true),
Step(title: Text('step2'), content: Text('step2 content'))
],
),
),
),
),
);
final Finder connectorLines = find.byWidgetPredicate(
(Widget widget) =>
widget is ColoredBox &&
widget.child is SizedBox &&
(widget.child! as SizedBox).width == 3.0,
);
expect(connectorLines, findsWidgets);
final List<ColoredBox> lineWidgets = tester.widgetList<ColoredBox>(connectorLines).toList();
final List<Color> colors = lineWidgets.map((ColoredBox box) => box.color).toList();
// Both top and bottom box should be colored.
expect(colors.where((Color c) => c == activeColor).length, equals(2));
Style Guide References
Footnotes
68788e5 to
8f8f317
Compare
dkwingsmt
approved these changes
Aug 20, 2025
Contributor
dkwingsmt
left a comment
There was a problem hiding this comment.
LGTM except a nit. Thank you!
8f8f317 to
935fac6
Compare
QuncCccccc
approved these changes
Aug 26, 2025
Contributor
QuncCccccc
left a comment
There was a problem hiding this comment.
NICE fix! LGTM! Thank you for your contribution:)
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 26, 2025
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Aug 26, 2025
auto-submit bot
pushed a commit
to flutter/packages
that referenced
this pull request
Aug 26, 2025
flutter/flutter@a4cb00a...c65f01d 2025-08-26 [email protected] Roll Packages from fe66130 to 1ef712e (4 revisions) (flutter/flutter#174442) 2025-08-26 [email protected] Revert "Directly generate a Mach-O dynamic library using gen_snapshot (#171626) (flutter/flutter#174392) 2025-08-26 49699333+dependabot[bot]@users.noreply.github.com Bump codecov/codecov-action from 5.4.0 to 5.5.0 in the all-github-actions group (flutter/flutter#174436) 2025-08-26 [email protected] Roll Skia from 9daab16abbf9 to 21214d63fc40 (1 revision) (flutter/flutter#174431) 2025-08-26 [email protected] Roll Fuchsia Linux SDK from UiY8gj468PZUj6QTm... to L5zGzsIWIS8N36AFQ... (flutter/flutter#174430) 2025-08-26 [email protected] Roll Dart SDK from f1f90d413dd3 to 9054cd8af73c (2 revisions) (flutter/flutter#174428) 2025-08-26 [email protected] Roll Skia from afb5c22d9ba0 to 9daab16abbf9 (2 revisions) (flutter/flutter#174429) 2025-08-26 [email protected] Roll Skia from 2227187dbdcf to afb5c22d9ba0 (1 revision) (flutter/flutter#174425) 2025-08-26 [email protected] [iOS][Secure Paste] Custom edit menu actions (flutter/flutter#171825) 2025-08-26 [email protected] Make SystemUiOverlayStyle to be diagnosticable (flutter/flutter#174018) 2025-08-26 [email protected] Fix: Active step fully colored in vertical mode (flutter/flutter#173152) 2025-08-26 [email protected] Migrate to use `WidgetStateProperty` (flutter/flutter#174323) 2025-08-26 [email protected] Roll Skia from ed42a94ee066 to 2227187dbdcf (3 revisions) (flutter/flutter#174417) 2025-08-26 [email protected] Roll Dart SDK from a0e39d9b4a58 to f1f90d413dd3 (1 revision) (flutter/flutter#174409) 2025-08-26 [email protected] [Impeller] Flush the data written to the device buffer by RoundSuperellipseGeometry (flutter/flutter#174316) 2025-08-26 [email protected] Remove obsolete vulkan_window source files (flutter/flutter#174087) 2025-08-25 [email protected] [web] Migrate non-CanvasKit-specific tests to ui/ (flutter/flutter#174396) 2025-08-25 [email protected] Create Hot Restart over websocket test (flutter/flutter#173852) 2025-08-25 [email protected] Roll Dart SDK from e283a9e88242 to a0e39d9b4a58 (1 revision) (flutter/flutter#174383) 2025-08-25 [email protected] Update `master` CHANGELOG for 3.35.2 (flutter/flutter#174399) 2025-08-25 [email protected] Roll Skia from da724d312e65 to ed42a94ee066 (4 revisions) (flutter/flutter#174394) 2025-08-25 [email protected] Update dwds to 25.0.3 (flutter/flutter#174379) 2025-08-25 [email protected] Fix logic statements in year2023 documentation (flutter/flutter#174120) 2025-08-25 [email protected] Release thread-local resources when submitting a Flutter GPU command buffer (flutter/flutter#173663) 2025-08-25 [email protected] [web] Refactor LayerScene out of CanvasKit (flutter/flutter#174375) 2025-08-25 [email protected] Stream logs from `devicectl` and `lldb` (flutter/flutter#173724) 2025-08-25 [email protected] NavigatorPopScope examples no longer use deprecated onPop. (flutter/flutter#174291) 2025-08-25 [email protected] fix typo in test documentation function name (flutter/flutter#174297) 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] 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
mboetger
pushed a commit
to mboetger/flutter
that referenced
this pull request
Sep 18, 2025
Fix: Active step fully colored in vertical mode fixes: flutter#169661 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. Co-authored-by: Qun Cheng <[email protected]>
korca0220
pushed a commit
to korca0220/flutter
that referenced
this pull request
Sep 22, 2025
Fix: Active step fully colored in vertical mode fixes: flutter#169661 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. Co-authored-by: Qun Cheng <[email protected]>
Jaineel-Mamtora
pushed a commit
to Jaineel-Mamtora/flutter_forked
that referenced
this pull request
Sep 24, 2025
Fix: Active step fully colored in vertical mode fixes: flutter#169661 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. Co-authored-by: Qun Cheng <[email protected]>
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/packages
that referenced
this pull request
Nov 12, 2025
lucaantonelli
pushed a commit
to lucaantonelli/flutter
that referenced
this pull request
Nov 21, 2025
Fix: Active step fully colored in vertical mode fixes: flutter#169661 ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing. Co-authored-by: Qun Cheng <[email protected]>
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.
Fix: Active step fully colored in vertical mode
fixes: #169661
Pre-launch Checklist
///).