'How to make flutter desktop app goes fullscreen when move to top of the screen
Solution 1:[1]
you can use windows_manager package. add this code to your main.dart:
import 'package:flutter/material.dart';
import 'package:window_manager/window_manager.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
// Must add this line.
await windowManager.ensureInitialized();
// Use it only after calling `hiddenWindowAtLaunch`
windowManager.waitUntilReadyToShow().then((_) async{
// Hide window title bar
await windowManager.setTitleBarStyle(TitleBarStyle.hidden);
await windowManager.setSize(Size(800, 600));
await windowManager.center();
await windowManager.show();
await windowManager.setSkipTaskbar(false);
});
runApp(MyApp());
}
Solution 2:[2]
Solution: Just add WS_OVERLAPPEDWINDOW to window_class in win32_window.cpp
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | Somxhai |