bitsdojo / bitsdojo_window

A Flutter package that makes it easy to customize and work with your Flutter desktop app window.
http://www.youtube.com/watch?v=bee2AHQpGK4
MIT License
815 stars 229 forks source link

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

Open sleepreading opened 2 years ago

sleepreading commented 2 years ago

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.

kekavc24 commented 2 years ago

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.

bitsdojo commented 2 years ago

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

kekavc24 commented 2 years ago

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

bitsdojo commented 2 years ago

Sounds good!

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

kekavc24 commented 2 years ago

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

kekavc24 commented 2 years ago

@bitsdojo #206 done here

Mamasodikov commented 1 year ago

It really sucks!