window_manager icon indicating copy to clipboard operation
window_manager copied to clipboard

Exiting app throws an error in Win10

Open hare-siterwell opened this issue 8 months ago • 0 comments

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());
}

hare-siterwell avatar Dec 15 '23 03:12 hare-siterwell