window_manager
window_manager copied to clipboard
setting the size in the example does not work for me
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!'),
),
),
);
}
}
I'm having the same problem.
Flutter 3.13.9 • channel stable
Ubuntu 23.10 on Wayland
window_manager: ^0.3.7
Exactly the same for me too.