Closed Tommy-Wang0602 closed 7 months ago
Hi @Tommy-Wang0602.
Are you using the MobileCalendarAddItemBottomSheet
inside a Scaffold
?
If so, that's the problem because the sheet and the SheetContentScaffold
watch the MediaQueryData.viewInset.bottom
to handle the appearing/disappearing of the keyboard, but the Scaffold
consumes the viewInset
resulting in the descendant widgets always getting viewInset.bottom == 0
.
Here's the possible solutions for this case in my mind so far:
Scaffold.resizeToAvoidBottomInset
to false, which prevents the Scaffold
from consuming the viewInset
.Scaffold
rather than nesting them.Stack(children: [ Scaffold(), YourSheet() ]);
Feel free to ask here if you have any question :)
@fujidaiti very valuable and important info, thanks!
Hi~ @fujidaiti
Thank you for your reply. I appreciate the practical advice and solution direction you provided, which resolved this issue.
Hi ~ @fujidaiti
As shown as video I've been encountering some issues with ScrollableSheet ,I'm not sure if it's a bug or a layout problem. Due to certain reasons, I need to have the ScrollableSheet appear in the same layer view using a Stack. However, I've been struggling to find a way to prevent the ScrollableSheet from displaying a spring-like animation when the keyboard opens. I'm seeking advice on how to solve this problem.
I've included the code I've been using below for reference.
https://github.com/fujidaiti/smooth_sheets/assets/133644139/ff22dcf4-e4c4-4412-85bd-7f1234e8aad6