Skip to content

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

License

Notifications You must be signed in to change notification settings

Migarl/desktop_window

 
 

Repository files navigation

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)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 54.4%
  • CMake 19.4%
  • Dart 12.3%
  • Swift 6.2%
  • Ruby 4.2%
  • C 3.5%