leanflutter / window_manager

This plugin allows Flutter desktop apps to resizing and repositioning the window.
https://pub.dev/packages/window_manager
MIT License
701 stars 193 forks source link

Titlebar hidden but with buttons #444

Closed KamuiAkuto closed 6 months ago

KamuiAkuto commented 7 months ago

Hello,

I am trying to make the title bar invisible but keep the close etc button. As far as i understand the following code should archive that, but the buttons are also hidden.

void main() async{
  WidgetsFlutterBinding.ensureInitialized();
  await windowManager.ensureInitialized();

  windowManager.waitUntilReadyToShow().then((_) async{
       await windowManager.setTitleBarStyle(
    TitleBarStyle.hidden,
    windowButtonVisibility: false,
 );
  });

   runApp(const MyApp());
}

Did i misunderstand something or why is it not working.

Also additionally is it normal that i can't move the windows then the title bar is hidden?

lijy91 commented 6 months ago

Please use the DragToMoveArea and DragToResizeArea widgets to implement the function of moving and resizing window