window_manager icon indicating copy to clipboard operation
window_manager copied to clipboard

[Windows] No implementation found for method setMovable on channel window_manager

Open mekjolle opened this issue 5 months ago • 0 comments

When adding .setMoveable to "window manager" startup properties:

image

This works:

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

  WindowOptions windowOptions = const WindowOptions(
    size: Size(1920, 1080),
    center: true,
    backgroundColor: Colors.transparent,
    skipTaskbar: false,
    windowButtonVisibility: false,
  );
  windowManager.waitUntilReadyToShow(windowOptions, () async {
    await windowManager.show();
    await windowManager.focus();
    await windowManager.maximize();
    await windowManager.setMaximizable(false);
    await windowManager.setResizable(false);
  });

  runApp(const ProviderScope(child: MyApp()));
}

This doesn't work:

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

  WindowOptions windowOptions = const WindowOptions(
    size: Size(1920, 1080),
    center: true,
    backgroundColor: Colors.transparent,
    skipTaskbar: false,
    windowButtonVisibility: false,
  );
  windowManager.waitUntilReadyToShow(windowOptions, () async {
    await windowManager.show();
    await windowManager.focus();
    await windowManager.maximize();
    await windowManager.setMaximizable(false);
    await windowManager.setResizable(false);
    await windowManager.setMovable(false);
  });

  runApp(const ProviderScope(child: MyApp()));
}

mekjolle avatar Mar 05 '24 10:03 mekjolle