Skip to content

Conversation

@abdalmonem
Copy link
Contributor

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
Simulator Screenshot - iPhone 15 - 2024-06-26 at 13 37 26

direction: Axis.vertical
Simulator Screenshot - iPhone 15 - 2024-06-26 at 13 43 07

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 will be like:
Simulator Screenshot - iPhone 15 - 2024-06-26 at 13 51 46

I keep it as it is , 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.
Fixes #150416

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jun 26, 2024
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @abdalmonem thanks for contributing! It looks like the autoformatter may have been run over some of this code, can you revert that? The flutter repo does not use the autoformatter: https://github.com/flutter/flutter/blob/master/docs/contributing/Style-guide-for-Flutter-repo.md#in-defense-of-the-extra-work-that-hand-formatting-entails

@Piinks Piinks requested a review from QuncCccccc June 26, 2024 18:34
@abdalmonem
Copy link
Contributor Author

Heeeey @Piinks , and yah sure i will , but i am facing another issue with Github automated linux analyzer, and i am working on.

@QuncCccccc
Copy link
Contributor

i am facing another issue with Github automated linux analyzer, and i am working on.

Hey! From the error message, looks like we juts need to add a type for topPosition
Screenshot 2024-06-26 at 12 50 57 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Possibility to arrange SegmentedButton vertically

3 participants