3

When our Flutter desktop app running on Windows, if we resize the window or max the window, there will be a black area in the app. How to disable window resize on Flutter desktop windows?

I have tired

  ws.setWindowMaxSize(Size(width * 0.9, height * 0.9));
  ws.setWindowMinSize(Size(width * 0.9, height * 0.9));

But it does not work. There is no code to deal with the code 'setWindowMaxSize' and 'setWindowMinSize' in flutter-desktop-embedding\plugins\window_size\windows\window_size_plugin.cpp .

If it is difficult, is there any good idea to make the Flutter desktop app looks better when resizing? Maybe show a 'Loading' message? Thanks.

Andreas
  • 5,393
  • 9
  • 44
  • 53
atfa kRIS
  • 31
  • 1
  • 2

1 Answers1

0

did you add this to your pubspec?

window_size:
    git:
      url: git://github.com/google/flutter-desktop-embedding.git
      path: plugins/window_size
  • At the time the question was asked, window_size didn't support those methods on Windows; that was added several months later: https://github.com/google/flutter-desktop-embedding/pull/784 – smorgan Jan 04 '21 at 02:30