抽屉导航

发布于 2025-01-25 10:03:08 字数 158 浏览 6 评论 0原文

我有一个自定义抽屉中的屏幕列表。

屏幕1, 屏幕2, 屏幕3

按下按钮时,从屏幕1到屏幕2导航到屏幕2的正确方法是什么。当前,当我按下或推更换时,我正在丢失汉堡包(抽屉按钮)选项。

我没有的代码不是我写的,我无法访问编写代码的人。

有什么想法吗?

I have a list of Screens in a custom drawer.

Screen 1,
Screen 2,
Screen 3

What is the proper way of navigating from Screen 1 to Screen 2 on push of a button. Currently, I am losing the hamburger (the drawer button) option when I push or push replace.

The code I have was not written by me and I do not have access to the person who wrote the code.

Any thoughts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笔芯 2025-02-01 10:03:08

只需使用标准导航:

TextButton(
  onPressed: (){
    Navigator.push(context, MaterialPageRoute(builder: (context) => Screen2()));
  }
  child: 
    //child goes here
)

Just use the standard navigation:

TextButton(
  onPressed: (){
    Navigator.push(context, MaterialPageRoute(builder: (context) => Screen2()));
  }
  child: 
    //child goes here
)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文