Flutter桌面软件开发如何改变窗口大小

发布于 1 年前 作者 phonegap100 271 次浏览 来自 分享

Flutter桌面软件开发的时候可以使用bitsdojo_window改变窗口大小

dependencies:
  bitsdojo_window: ^0.1.5
import 'package:bitsdojo_window/bitsdojo_window.dart';
void main() async {
  runApp(const MyApp());
   doWhenWindowReady(() {
    final win = appWindow;
    const initialSize = Size(800, 600);
    win.minSize = initialSize;
    win.size = initialSize;
    win.alignment = Alignment.center;
    win.title = "Custom window with Flutter";
    win.show();
  });
回到顶部