I have a stateful widget who's root widget is a Dismissible. When I pull down on the screen the dismissible reveals the background, which is black. What I would like to see is the previous screen peeking out from behind. I did come up with a hack that sort of works. I stashed the previous stateful widget in a global variable, and set it as the background of the dismissible. This is not a great solution and there are a number of issues that it causes, like some screen blinking. Is there an official way to make this work?
Try push a PageRouteBuilder
rathe than a MaterialPageRoute
.
Navigator.push(context, PageRouteBuilder(opaque: false, pageBuilder: (_, __, ___) => DismissableScreen()));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With