I've made a simple flutter app for windows, when I run it shows the default Titlebar that windows has. How can I remove it ??
-
As title bar do you mean where the cross, minimize, etc is situated? – Zihan Aug 19 '21 at 18:24
-
Yes, i mean where the Close, Minimize, maximize buttons are situated – Manan Domadiya Aug 20 '21 at 03:55
2 Answers
Use this package window_manager and do this.
Add this line to the top of the file:
import 'package:window_manager/window_manager.dart';
Then add this line of code(this function is not officially documented).
void main() async{
runApp(const MyApp());
windowManager.waitUntilReadyToShow().then((_) async{
await windowManager.setAsFrameless();
});
}
You may alternatively want just to hide the titlebar but leave the buttons visible. This can be done as follows:
await windowManager.setTitleBarStyle(TitleBarStyle.hidden);

- 1,222
- 12
- 22

- 91
- 1
- 1
Using this package bitsdojo_window do the following:
Inside your application folder, go to windows\runner\main.cpp
and add these two lines at the beginning of the file:
#include <bitsdojo_window_windows/bitsdojo_window_plugin.h>
auto bdw = bitsdojo_window_configure(BDW_CUSTOM_FRAME | BDW_HIDE_ON_STARTUP);
Now go to lib\main.dart
and add this code in the main function right after runApp(MyApp());
:
void main() {
runApp(MyApp());
// Add this code below
doWhenWindowReady(() {
appWindow.show();
});
}
You can also customize the window with something like:
doWhenWindowReady(() {
final initialSize = Size(600, 450);
appWindow.minSize = initialSize;
appWindow.size = initialSize;
appWindow.alignment = Alignment.center;
appWindow.show();
});
To implement your own title buttons and text, you can use these methods from the package:
appWindow.title(title);
appWindow.close();
appWindow.maximize();
appWindow.minimize();
You can also give the properties of the title bar to any widget (like dragging and double click for maximize) by wraping it inside MoveWindow()
widget.

- 630
- 8
- 20