bitsdojo_window icon indicating copy to clipboard operation
bitsdojo_window copied to clipboard

When Navigator push a new page, the root page's window buttons disappears

Open sleepreading opened this issue 3 years ago • 7 comments

We usually add window button (minimized button, maximized button ..) to the root page. and hope these buttons work like the windows title bar (never disappears). But if we Navigator.of(context).push() a new page, this page will have no these buttons. By the way, add this code

Column(
        children: [
          WindowTitleBarBox(
            child: Row(
              children: [
                Expanded(child: MoveWindow()),
                windowButtons,
              ],
            ),
          ),
          Expanded(child: mainBody),  // <-- the real content
        ],
      )

to every page is really redundant.

sleepreading avatar Feb 09 '22 03:02 sleepreading

Hey @sleepreading. Can you add code from main.dart file. I wanna see how you handle navigation. Then suggest a workaround that worked for me.

kekavc24 avatar Nov 19 '22 08:11 kekavc24

I somehow missed this question but this is a great idea and I should add an example app that uses navigation.

bitsdojo avatar Nov 19 '22 08:11 bitsdojo

@bitsdojo Can I create one with a simple onGenerateRoute and create a PR for flutter windows?

kekavc24 avatar Nov 19 '22 09:11 kekavc24

Sounds good!

I was wondering if anyone would be interested in an example using go_router?

bitsdojo avatar Nov 19 '22 09:11 bitsdojo

Why not? 😅 Someone will want to use it with go_router. It's always great to tackle every avenue IMO!

kekavc24 avatar Nov 19 '22 10:11 kekavc24

@bitsdojo #206 done here

kekavc24 avatar Nov 19 '22 14:11 kekavc24

It really sucks!

Mamasodikov avatar Oct 30 '23 16:10 Mamasodikov