Flutter 是否在堆栈中使用MaterialApp.router()?

Flutter 是否在堆栈中使用MaterialApp.router()?,flutter,flutter-layout,Flutter,Flutter Layout,我目前正在使用MaterialApp.router()作为我的顶级小部件。 但我想做的是在我的素材应用程序下面设置一个背景。 我希望在用户按下并弹出堆栈时,背景以各种方式进行动画处理(转到应用程序中的各种屏幕) 我试过这样的东西 Stack(children: [ SomeCrazyAnimatedBackground(), MaterialApp.router(sets up delegates ect) ]); 但这不起作用,因为我认为Material小部件

我目前正在使用MaterialApp.router()作为我的顶级小部件。 但我想做的是在我的素材应用程序下面设置一个背景。 我希望在用户按下并弹出堆栈时,背景以各种方式进行动画处理(转到应用程序中的各种屏幕)

我试过这样的东西

Stack(children: [
        SomeCrazyAnimatedBackground(),
        MaterialApp.router(sets up delegates ect)
]);
但这不起作用,因为我认为Material小部件需要是堆栈的父级

你有没有想过我该如何实现我想要的?我是否停止使用材质而改用WidgetApp