setWindowSize function

Future setWindowSize(
  1. double? width,
  2. double? height
)

Implementation

Future setWindowSize(double? width, double? height) async {
  if (isDesktopPlatform()) {
    debugPrint("setWindowSize($width, $height)");
    var currentSize = await windowManager.getSize();
    await windowManager.setSize(
        Size(width ?? currentSize.width, height ?? currentSize.height),
        animate: defaultTargetPlatform != TargetPlatform.macOS);
  }
}