bitsdojo_window icon indicating copy to clipboard operation
bitsdojo_window copied to clipboard

AppBar support already available

Open j0chn1 opened this issue 2 years ago • 3 comments

Hey, I wanted to use an AppBar to display my apps name. So I created one and added your WindowBorder to the body. It ended up having the AppBar above the windowbuttons. image

So I just tried to put your WindowBorder to the appbar.

Scaffold(
            appBar: AppBar(flexibleSpace: getWindowBorder(context, true)),
            body: theme)

That works pretty good. image

Additionally it fixed an endless exception throwing of my MultiSplitView. Maybe you want to add that to your README.

j0chn1 avatar Nov 04 '21 20:11 j0chn1

Works pretty nice. Can also wrap it in MoveWindow in flexibleSpace to make the whole AppBar draggable. Can't drag the window under the tile text though.

stibay avatar Nov 19 '21 18:11 stibay

Me neither, I mentioned it in https://github.com/bitsdojo/bitsdojo_window/issues/91

j0chn1 avatar Nov 19 '21 20:11 j0chn1

Figgured out a workaround, proabably easier way to do this. Pretty new to flutter. Tried to get it to work using the Stack widget with MoveWindow but didn't get that to work so I just looked at the code in MoveWindow and just copied it to the title in the AppBar 😄

 title: GestureDetector(
            behavior: HitTestBehavior.translucent,
            onPanStart: (details) {
              appWindow.startDragging();
            },
            onDoubleTap: () => appWindow.maximizeOrRestore(),
            child: Text(widget.title)),
      ),

stibay avatar Nov 19 '21 20:11 stibay