Skip to content

[Windows] Setting min Window size does not work #9

Description

@DenuxPlays

Hey,

I tried to limit the window size for my flutter app but it does not appear to work.
Code:

void _configureWindow() {
  if (!PlatformUtils.isDesktop) {
    debugPrint('Window configuration is only supported on desktop platforms.');
    return;
  }

  final window = nativeapi.WindowManager.instance.getCurrent();
  if (window == null) {
    debugPrint('Failed to get current window for configuration.');
    return;
  }

  window.setMinimumSize(windowMinWidth, windowMinHeight);
  window.show();
  window.focus();
  debugPrint("Window size set to: ${currentWindowSize.width}x${currentWindowSize.height}");
}

The output from the code is:
Window size set to: 0.0x0.0

Is there something I did wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions