Skip to content
pubscout

desktop_window

0.4.4, released 6 months ago by mix1009.com

Flutter desktop plugin to get and change window size.

$ flutter pub add desktop_window
Source repository

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.