Skip to content
pubscout

window_manager

0.7.0, released 9 days ago by leanflutter.dev

Flutter desktop window resizing, moving, showing, hiding via nativeapi.

Uses material_ui
$ flutter pub add window_manager
Source repository

What it does

Provides APIs to control window size, position, visibility and decoration on Windows, macOS and Linux. It exposes native window objects and events through the nativeapi core.

AI-written summary of version 0.7.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need frameless or custom title bars
  • You want to programmatically resize or reposition windows
  • You need multi‑window support in a desktop Flutter app

Skip it when

  • You target only mobile or web
  • You need a very lightweight dependency and can live without nativeapi

Strengths

  • Cross‑platform native window control
  • No platform‑specific plugin code, all logic in nativeapi
  • Supports custom title bars and multi‑window APIs

Weaknesses

  • Requires Flutter 3.50 / Dart 3.14 and nativeapi 0.6.0
  • Linux needs GTK3, X11 and Xi dev files
  • Legacy API is deprecated and will be removed

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
3

Add window_manager to pubspec, run flutter pub get. On Linux install libgtk-3-dev libx11-dev libxi-dev. No build_runner needed.

import 'package:window_manager/window_manager.dart';

final window = WindowManager.instance.getCurrent()!;
window.title = 'My App';
window.setSize(const Size(1000, 700).toNative(), false);
window.center();
window.show();

Alternatives

Packages that do the same job and could replace window_manager.

  • win32

    Provides low‑level Windows window APIs if you only target Windows and need finer control.

Works with

Packages commonly used together with window_manager: ones it builds on, ones built on it, and its own family.