wisnuwiry / flutter_web_frame

Make Limit content size in Flutter Web/Desktop/PWA, Make your app that doesn't support responsiveness more focused on content. Demo: https://flutter-web-frame.vercel.app
https://pub.dev/packages/flutter_web_frame
MIT License
16 stars 9 forks source link

With Flutter 3.10 MediaQuery.of(context).size shows maximum size set with Flutter Web Frame #8

Open mklepaczko opened 1 year ago

mklepaczko commented 1 year ago

When using Flutter Web Frame with Flutter 3.10, instead of showing correct width and height MediaQuery.of(context).size shows only the fixed size preset with maximumSize.

To recreate issue add Flutter Web Frame to the standard Flutter counter project and print height and width.

As for additionnal info here is my Flutter doctor:

[✓] Flutter (Channel stable, 3.10.5, on macOS 13.4 22F66 darwin-arm64, locale pl-PL)
    • Flutter version 3.10.5 on channel stable at /Users/michalklepaczko/projekty_dev/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 796c8ef792 (7 days ago), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/michalklepaczko/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.79.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.66.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 114.0.5735.133

[✓] Network resources
    • All expected network resources are available.

• No issues found!
wisnuwiry commented 1 year ago

Hi @mklepaczko is there a sample project that i can reproduce?

mklepaczko commented 1 year ago

Hello, it happens with the root counter project, but it seems that you published a new version solving that ?

mklepaczko commented 1 year ago

Hi, sorry for this late reply. Just tried on a project and the problem persists

paulononaka commented 1 year ago

I'm not sure, but it seems that wrap the the app with MediaQuery is buggy in Flutter 3.10.

https://stackoverflow.com/a/76620497/611372

sadjadtalakoob74 commented 11 months ago

same problem

nizioleque commented 9 months ago

Same problem here. To reproduce, just print MediaQuery.of(context) in any widget inside the web frame. The size and pixel ration will be incorrect. Any updates @wisnuwiry?