window_manager icon indicating copy to clipboard operation
window_manager copied to clipboard

setting the size in the example does not work for me

Open whoizit opened this issue 10 months ago • 2 comments

I'm trying to set the size: Size(400, 200), or size: Size(1900, 1000), - I always get the same window size, possible 1280x720

Flutter 3.13.7 • channel stable vscode editor Arch Linux, Hyprland WM window_manager: ^0.3.7

Example from Usage part README.md

Full main.dart from my project:

import 'package:flutter/material.dart';
import 'package:window_manager/window_manager.dart';

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

  WindowOptions windowOptions = const WindowOptions(
    size: Size(400, 200),
    center: true,
    backgroundColor: Colors.transparent,
    skipTaskbar: false,
    titleBarStyle: TitleBarStyle.hidden,
  );
  windowManager.waitUntilReadyToShow(windowOptions, () async {
    await windowManager.show();
    await windowManager.focus();
  });
  runApp(const MainApp());
}

class MainApp extends StatelessWidget {
  const MainApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Center(
          child: Text('Hello World!'),
        ),
      ),
    );
  }
}

whoizit avatar Oct 16 '23 09:10 whoizit

I'm having the same problem.

Flutter 3.13.9 • channel stable
Ubuntu 23.10 on Wayland
window_manager: ^0.3.7

vindolin avatar Nov 10 '23 16:11 vindolin

Exactly the same for me too.

aimer63 avatar Apr 02 '24 12:04 aimer63