v0.4.3
desktop_window
用於取得和變更視窗大小的 Flutter 桌面外掛程式(macOS/Linux/Windows)。
348喜歡 1.4萬近 30 天下載130Pub 分數
macOSWindowsLinux
用於 Flutter 桌面端(macOS/Linux/Windows)變更視窗大小的 Flutter 插件。
{"sdk":"flutter"}{"sdk":"flutter"}以下為英文專案原文快照,最新內容請造訪 GitHub。
Flutter plugin for Flutter desktop(macOS/Linux/Windows) to change window size.
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();
}
Linux support has been contributed by Justus Fluegel (https://github.com/JustusFluegel)