-
Notifications
You must be signed in to change notification settings - Fork 70
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
feat: Add Attached Sheet to Playground #265
Conversation
Visit the preview URL for this PR (updated for commit 8b21441):
(expires Wed, 24 Jul 2024 22:17:19 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 00f7f56c8a4ce5693de819a908406c0fc6411226 |
playground/lib/home/custom_sheets/attached_floating_bottom_sheet_type.dart
Show resolved
Hide resolved
Thank you very much for the example! |
@ABausG When RTL is selected, there is weird behavior. Can you check? ltr_wms.mov |
Did not test that!! Solved by swapping the passed alignment based on the directionality. Works for me now! |
👑 AMAZING! Super happy <3 |
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.
Did a further refactor to now auto-calculate the Alignment that results in the most available space. By my testing (resizing to super small form factors) this now solves the issue as in the screenshot from mobile |
I tried on latest version, it looks same. Let me test on more devices also |
@durannumit I did some more adjustments to the maxWidth calculation but for me it also works fine on iOS and Android Simulator 🤔 |
it works well now! Thanks for quick adjustment, LGTM 🚀 |
Description
Adding an AttachedFloatingBottomSheetType to the Playground App.
This works by using a
GlobalKey
as the anchor to Align the Sheet at the Position of the Anchor.One thing I think can still be improved is the animation. Ideally it would be nice if the Modal Scales out from the anchor position (+ Transformation based on Anchor Size/Alignment)
A Demo (before improvements to the Alignments/Size Constraints can be found here:
Screen.Recording.2024-07-18.at.00.11.28.mov
Related Issues
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).This will ensure a smooth and quick review process.
///
).melos run analyze
) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?