window_manager
window_manager copied to clipboard
Exiting app throws an error in Win10
The error message for exiting the application is as follows:
Lost connection to device.
../../flutter/shell/platform/embedder/embedder.cc (2450): 'FlutterEngineSendPlatformMessage' returned 'kInvalidArguments'. Invalid engine handle.
Exited.
After my testing, the error only occurs when I enable size or titleBarStyle in WindowOptions:
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await windowManager.ensureInitialized();
WindowOptions windowOptions = const WindowOptions(
size: Size(800, 600),
titleBarStyle: TitleBarStyle.hidden,
);
windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});
runApp(const MyApp());
}