You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I needed to implement a specific navigation flow in my app and couldn't find an out-of-the-box solution, so I built a custom one. The flow includes three screens:
Screen A opens a BottomSheet with Screen B inside it.
On Screen B, clicking a button navigates to Screen C, which:
Fully covers both previous screens (including the BottomSheet),
Cannot be dismissed by swiping down like a regular BottomSheet,
Opens with a smooth transition animation.
When Screen C is closed (e.g. via back button), the BottomSheet with Screen B should either:
Immediately reappear, or
Animate back in from the bottom.
I used some sample projects as a reference and managed to get this behavior working. The code and demo video are included.
However, the current implementation feels a bit complex, and I believe there must be a simpler or more idiomatic way to achieve the same result—perhaps using better navigation abstractions or state handling.
If you have suggestions or ideas on how to simplify or improve this pattern, I'd love to hear them!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
2_5368569361764216888.mp4
I needed to implement a specific navigation flow in my app and couldn't find an out-of-the-box solution, so I built a custom one. The flow includes three screens:
Screen A opens a BottomSheet with Screen B inside it.
On Screen B, clicking a button navigates to Screen C, which:
Fully covers both previous screens (including the BottomSheet),
Cannot be dismissed by swiping down like a regular BottomSheet,
Opens with a smooth transition animation.
Immediately reappear, or
Animate back in from the bottom.
I used some sample projects as a reference and managed to get this behavior working. The code and demo video are included.
However, the current implementation feels a bit complex, and I believe there must be a simpler or more idiomatic way to achieve the same result—perhaps using better navigation abstractions or state handling.
If you have suggestions or ideas on how to simplify or improve this pattern, I'd love to hear them!
Beta Was this translation helpful? Give feedback.
All reactions