desktop_window 0.4.2 copy "desktop_window: ^0.4.2" to clipboard
desktop_window: ^0.4.2 copied to clipboard

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

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)

332
likes
140
points
108k
downloads

Publisher

verified publishermix1009.com

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on desktop_window