-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Add 'direction' allow to 'SegmentedButton' oriented vertically #150903
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
Conversation
|
#150854 |
|
Hi @abdalmonem! Thanks a lot for the contribution:) Could you try to rebase master again to see whether the failures can be fixed? I also encountered the same problem and rebasing master works for me. |
|
Hello @QuncCccccc , yah of course. |
|
@QuncCccccc Yeeees all checks have passed 👍 |
QuncCccccc
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.
Thanks so much for the contribution! Overall this looks great! Just left some suggestions and questions below:)
|
Hi @abdalmonem thanks for contributing! Would you like to continue working on this change? |
|
@Piinks Yah and i am sorry for the late response , am going to contenu improvement this pr depends on @QuncCccccc review notes |
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
Oh! my bad :) Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
Co-authored-by: Qun Cheng <36861262+QuncCccccc@users.noreply.github.com>
Improve test by checking all items is vertically aligned using rect dimensions. Fix expand constraints on the vertical direction.
|
Hey @abdalmonem can you rebase with the tip of tree to resolve the failing ci.yaml check? Thanks! |
|
@Piinks , Sorry mistakenly i merage insted of rebase. |
|
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
@Piinks i see "ci.yaml"test got passed successfully. |
|
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
QuncCccccc
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! Thanks for the contribution!
| label: Text('Option 1'), | ||
| ), | ||
| ], | ||
| selected: const <int>{0}, // Prevent any of ButtonSegment to be selected |
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 comment seems unnecessary?
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 agree with u 👍
Piinks
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, thank you!
Roll Flutter from 2e221e7 to 303f222 (77 revisions) flutter/flutter@2e221e7...303f222 2024-09-12 34871572+gmackall@users.noreply.github.com Manual roll to 48ddaf578fb0c8326d5b4b680b0f49ea72e33216 (flutter/flutter#155070) 2024-09-12 reidbaker@google.com Externalize and update onboarding instructions (flutter/flutter#154730) 2024-09-12 andrewrkolos@gmail.com when setting up the log reader for a device during `flutter run`, discard any `RPCError` thrown due to the device being disconnected (flutter/flutter#155049) 2024-09-12 98614782+auto-submit[bot]@users.noreply.github.com Reverts "iOS: update provisioning profile for 2024-2025 cert (#155052)" (flutter/flutter#155059) 2024-09-12 chris@bracken.jp iOS: update provisioning profile for 2024-2025 cert (flutter/flutter#155052) 2024-09-11 nate.w5687@gmail.com Factor out `Container` objects (flutter/flutter#153619) 2024-09-11 matanlurey@users.noreply.github.com Move (`dev/tools`), complete v0 of `native_driver` (Android) (flutter/flutter#154843) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from ade8ef293bc6 to ee5adf6d2ee1 (2 revisions) (flutter/flutter#155046) 2024-09-11 737941+loic-sharma@users.noreply.github.com Fix `flutter run` on Mac x64 hosts if Swift Package Manager is enabled (flutter/flutter#154645) 2024-09-11 engine-flutter-autoroll@skia.org Roll Packages from bb53e5d to 4c18648 (1 revision) (flutter/flutter#155033) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4eb729b7a5c4 to ade8ef293bc6 (3 revisions) (flutter/flutter#155031) 2024-09-11 34465683+rkishan516@users.noreply.github.com fix: Dropdown menu trying to access highlight element which doesn't exist when search and filters both are enabled (flutter/flutter#151969) 2024-09-11 fluttergithubbot@gmail.com Marks Linux build_tests_3_5 to be unflaky (flutter/flutter#154993) 2024-09-11 abnhamoda@gmail.com Add 'direction' allow to 'SegmentedButton' oriented vertically (flutter/flutter#150903) 2024-09-11 fluttergithubbot@gmail.com Marks Linux build_tests_5_5 to be unflaky (flutter/flutter#154995) 2024-09-11 chingjun@google.com Update the signature of DDS launcher callback. (flutter/flutter#154949) 2024-09-11 30870216+gaaclarke@users.noreply.github.com Migrate Color.toString() test, improves `equalsIgnoringHashCodes` (flutter/flutter#154934) 2024-09-11 36861262+QuncCccccc@users.noreply.github.com Update material and cupertino localizations (flutter/flutter#154959) 2024-09-11 fluttergithubbot@gmail.com Marks Linux build_tests_1_5 to be unflaky (flutter/flutter#154991) 2024-09-11 fluttergithubbot@gmail.com Marks Linux build_tests_2_5 to be unflaky (flutter/flutter#154992) 2024-09-11 111122076+shashwatpathak98@users.noreply.github.com Fix `flutter create` warning regarding Java compatibility (flutter/flutter#152836) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 54757dab9462 to 4eb729b7a5c4 (1 revision) (flutter/flutter#155022) 2024-09-11 34871572+gmackall@users.noreply.github.com Fix java version used by `build_aar_module_test` (flutter/flutter#154967) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0a14c519ea4f to 54757dab9462 (1 revision) (flutter/flutter#155015) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 35a3171b72c5 to 0a14c519ea4f (1 revision) (flutter/flutter#154984) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from b9c0b96c3316 to 35a3171b72c5 (1 revision) (flutter/flutter#154980) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 52eeea075767 to b9c0b96c3316 (1 revision) (flutter/flutter#154976) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from a26075f9b1e6 to 52eeea075767 (1 revision) (flutter/flutter#154973) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 60c15bc0f40e to a26075f9b1e6 (6 revisions) (flutter/flutter#154969) 2024-09-11 matanlurey@users.noreply.github.com Migrate `apple-mobile-web-*` to `mobile-web-*`. (flutter/flutter#154964) 2024-09-11 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8a038a6f7099 to 60c15bc0f40e (15 revisions) (flutter/flutter#154960) 2024-09-10 30870216+gaaclarke@users.noreply.github.com Adds dart fixes for Color opacity functions (flutter/flutter#154953) 2024-09-10 codefu@google.com Missing benchmarks for `foundation/all_elements_bench.dart` (flutter/flutter#154954) 2024-09-10 30870216+gaaclarke@users.noreply.github.com Update color assertions (flutter/flutter#154752) 2024-09-10 andrewrkolos@gmail.com handle EAGAIN (macOS) in ErrorHandlingProcessManager (flutter/flutter#154306) 2024-09-10 50643541+Mairramer@users.noreply.github.com fix unpack freezing app with animation duration zero (flutter/flutter#153890) 2024-09-10 matanlurey@users.noreply.github.com Remove last `--disable-dart-dev` in `flutter/flutter`. (flutter/flutter#154948) 2024-09-10 34871572+gmackall@users.noreply.github.com Remove scheduler: luci from new `build_aar_module_test` (flutter/flutter#154945) 2024-09-10 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#154939) 2024-09-10 36861262+QuncCccccc@users.noreply.github.com `CupertinoSlidingSegmentedControl` update (flutter/flutter#152976) 2024-09-10 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#154933) 2024-09-10 andrewrkolos@gmail.com fix test `chrome.close can recover if getTab throws a StateError` (flutter/flutter#154889) 2024-09-10 jmccandless@google.com SearchBar context menu (flutter/flutter#154833) 2024-09-10 34871572+gmackall@users.noreply.github.com Fix `flutter build aar` for modules that use a plugin (flutter/flutter#154757) 2024-09-10 engine-flutter-autoroll@skia.org Roll Packages from b4e0fc1 to bb53e5d (4 revisions) (flutter/flutter#154926) 2024-09-10 tessertaha@gmail.com Clean up `SnackBar` inherit theme data test (flutter/flutter#154921) ...
This PR add the ability to change buttons of 'SegmentedButton' directionality (In the vertical and horizontal axis) to be 'vertical' or 'horizontal' instead of just horizontally position by adding "direction" argument.
direction: Axis.horizontal:direction: Axis.vertical:Notice: in this example i used:

style: ButtonStyle( shape: MaterialStateProperty.all<RoundedRectangleBorder>( const RoundedRectangleBorder( borderRadius: BorderRadius.zero, ), ), )To change the Radius of
SegmentedButton, and the default shape will be like:I keep it as it is right now, cause its not the main purpose of this BR.
List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.
If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.
Fixes: #150416
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.