Search packages, repositories and app categories

Package detailsv0.4.4

desktop_window

Flutter desktop plugin(macOS/Linux/Windows) to get and change window size.

macOSWindowsLinux
30-day downloads
71.4K
Likes
349
Pub points
140

Install package

flutter pub add desktop_window

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The desktop_window package is a Flutter plugin designed for macOS, Windows, and Linux that enables developers to retrieve and modify window properties such as size, position, and fullscreen status. It provides a simple API to interact with the native desktop window, making it ideal for applications requiring custom window management on desktop platforms. The plugin supports cross-platform development with consistent behavior across supported operating systems.

Use cases

  • Custom window sizing in desktop apps
  • Fullscreen mode control
  • Window position adjustments
  • Responsive UI for desktop
  • Cross-platform window management

Key features

  • Get and set window size
  • Adjust window position
  • Toggle fullscreen mode
  • Cross-platform support (macOS, Windows, Linux)
  • Simple, intuitive API

Suitable for

  • Desktop app developers
  • Apps needing window customization
  • Multi-platform desktop projects
  • UIs requiring responsive window handling

Considerations

  • Requires platform-specific permissions on some systems
  • Limited to desktop platforms
  • May require additional configuration for certain OS behaviors
  • Not suitable for mobile or web targets

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

desktop_window

Flutter plugin for Flutter desktop(macOS/Linux/Windows) to change window size.

Usage

import 'package:desktop_window/desktop_window.dart';

Future testWindowFunctions() async {
    Size size = await DesktopWindow.getWindowSize();
    print(size);
    await DesktopWindow.setWindowSize(Size(500,500));

    await DesktopWindow.setMinWindowSize(Size(400,400));
    await DesktopWindow.setMaxWindowSize(Size(800,800));

    await DesktopWindow.resetMaxWindowSize();
    await DesktopWindow.toggleFullScreen();
    bool isFullScreen = await DesktopWindow.getFullScreen();
    await DesktopWindow.setFullScreen(true);
    await DesktopWindow.setFullScreen(false);
    bool hasBorders = await DesktopWindow.hasBorders;
    await DesktopWindow.setBorders(false);
    await DesktopWindow.setBorders(true);
    await DesktopWindow.toggleBorders();
    await DesktopWindow.focus();
}

Contributers

Linux support has been contributed by Justus Fluegel (https://github.com/JustusFluegel)

Categories

Source repository

Projects using this package

Rankings