I am creating my app using Flutter.
However, I’m encountering difficulties with a particular implementation.
I would like to create a page that floats up from the bottom when a specific button is pressed, similar to the image below.
I’ve been trying various approaches, but it seems different from using showBottomSheet or showModalBottomSheet. What should I attempt to achieve this?
Thank you.
2
Answers
As I know, it’s a liitle bit difficult for you to create your own page transition animation which animate both incoming page and the outcoming page like in your example img, you can check this problem to learn about the workaround.
If you are not cared about the animation of the old page, maybe you can use a custom page transition to implement the similar page route animation, below is the example code in the flutter official doc
Notice that in the case above you use the
transitionBuilder
to customize the page switch animationby the way flutter did provide an iOS style UI package
cupertino
which has aCupertinoFullscreenDialogTransition
widget. You can check this another question to check out how to useCupertinoFullscreenDialogTransition
and here is the offical doc ofcupertino