desktop_window
0.4.4, released 6 months ago by mix1009.com
Flutter desktop plugin to get and change window size.
What it does
Allows Flutter apps running on macOS, Linux, and Windows to retrieve and modify the current window size, set min/max constraints, toggle full screen, control window borders, and focus the window.
AI-written summary of version 0.4.4, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to manage window dimensions and states in a desktop Flutter application.
- You need to programmatically toggle full screen or borders on desktop platforms.
Skip it when
- You are building exclusively for mobile or web platforms where window sizing APIs are unsupported or irrelevant.
- You need deep system tray management or multiple window creation rather than simple size adjustment.
Strengths
- Supports all three major desktop platforms (macOS, Linux, Windows).
- Simple and straightforward API for window size, borders, and full-screen state.
Weaknesses
- Limited to window size and basic states; does not provide advanced window management features like tray icons or multi-window orchestration.
- Platform-specific behaviors depend heavily on underlying native implementation.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Requires configuring appropriate environment constraints like Flutter >=3.41.0 and Dart >=3.11.0.
import 'package:desktop_window/desktop_window.dart';
Future testWindowFunctions() async {
Size size = await DesktopWindow.getWindowSize();
print(size);
await DesktopWindow.setWindowSize(Size(500,500));
}Alternatives
Packages that do the same job and could replace desktop_window.
- desktop_webview_window
Show a native webview window on your Flutter desktop application.
94Compare - fullscreen_window
A Flutter plugin to make your window fullscreen and get screen sizes.
53Compare - flutter_native_view
Embed native Windows windows and components directly into a Flutter window.
34Compare - multi_window
A package for adding multi window support to Flutter on Desktop.
47Compare