Skip to content
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

Make shrink wrapping items configurable to disable default behavior of resizing bottom sheet #24

Open
absar opened this issue Oct 3, 2022 · 1 comment · May be fixed by #25
Open

Make shrink wrapping items configurable to disable default behavior of resizing bottom sheet #24

absar opened this issue Oct 3, 2022 · 1 comment · May be fixed by #25

Comments

@absar
Copy link

absar commented Oct 3, 2022

The default behavior of shrink wrapping items has a bad UX as the list resizes when the number of available choices are changed e.g. when user taps to select a different set of items, which should be made configurable so that it could be disabled, while keeping the default behavior intact for backward compatibility.

Current behavior:

SizeIssueBefore.mp4

Expected behavior:

SizeIssueFix.mp4
absar added a commit to absar/flutter_awesome_select that referenced this issue Oct 3, 2022
…list items using `S2ChoiceConfig.shrinkWrap` or `SmartSelect.single.choiceShrinkWrap`/`SmartSelect.multiple.choiceShrinkWrap`.

If `choiceShrinkWrap` is true choices list will shrink wrap the choices, causing the list to resize based on the number of available choices, by default it will shrink wrap which was the default behaviour before this change.
@absar
Copy link
Author

absar commented Oct 3, 2022

Fixed in PR #25. Added a new parameter to not shrink wrap list items using S2ChoiceConfig.shrinkWrap or SmartSelect.single.choiceShrinkWrap/SmartSelect.multiple.choiceShrinkWrap. If choiceShrinkWrap is true choices list will shrink wrap the choices, causing the list to resize based on the number of available choices, by default it will shrink wrap which was the default behavior before this change.
Usage:

SmartSelect<T?>.single(
  choiceShrinkWrap: false
);
SmartSelect<T?>.multiple(
  choiceShrinkWrap: false
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant