本文介绍了当Drawer停留在应用栏上时,路由到另一个小部件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下抽屉.只要我只想在我的主抽屉项目的小部件之间进行切换,它就可以正常工作.

I have the following drawer. it works as it should as long as i only want to hop between the widgets of my main drawer items.

带抽屉导航

但是在那些小部件中,我想路由到一个新的小部件,例如,单击按钮,而抽屉留在我的角落.那么,基本上有什么方法可以在扑打中再现粘性的Android抽屉吗?

but inside those widgets i want to route to a new one, with a button click for example, while the drawer stays in my corner. So basically is there any way to reproduce a sticky android drawer in flutter ?

推荐答案

DrawerScaffold属性.

因此,当您转到另一个页面时,通常将有另一个具有自己的DrawerScaffold小部件,并且将丢弃上一个小部件.

So when you go to another page you will normally have another Scaffold widget with its own Drawerand the previous one will be disposed.

在新页面中,您需要为此Scaffold创建并显示Drawer,但不能将前一个保留在角落.

In the new page you need to create and display the Drawer for this Scaffold but you can't keep the previous one in the corner.

这篇关于当Drawer停留在应用栏上时,路由到另一个小部件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 12:09