webf icon indicating copy to clipboard operation
webf copied to clipboard

how to resizing the window, viewportWidth/viewportHeight changes together.

Open djunny opened this issue 2 years ago • 0 comments

Affected version

0.14.3

Flutter versions

3.7.12

No same issues found.

  • [X] Yes, I search all issues but not found.

Steps to Reproduce

  1. create macos application
  2. make webf instance
  3. run app
  4. resize the window

Code example

MediaQueryData queryData = MediaQuery.of(context);
Size viewportSize = queryData.size;
Scaffold(
        body: Center(
          child: Column(
            children: [
            Expanded(
                child:WebF(
          viewportWidth: viewportSize.width - queryData.padding.horizontal,
          viewportHeight: viewportSize.height - queryData.padding.vertical,
          bundle: WebFBundle.fromUrl('http://localhost:8080/'),
        ),),
          ])));

Expected results

Keep viewportWidth/viewportHeight consistent with window size.

Actual results

When window resize, viewportWidth/viewportHeight does not change

djunny avatar Oct 11 '23 06:10 djunny