Codelessly / ResponsiveFramework

Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/
https://codelessly.com
MIT License
1.25k stars 150 forks source link

Initial width not working in web on iPad #135

Open nietsmmar opened 1 year ago

nietsmmar commented 1 year ago

I implemented my app exactly like the example states. I did set the maxWidth to 810 as my iPad (9th) has 810 width and I want it to be fullscreen there.

When loading the Web-App it is not going fullscreen but when I turn my iPad, close and reopen safari or turn the screen of and on again, it resizes to full width.

This is really weird behavior in my opinion.

I add a video to show the behavior:

https://user-images.githubusercontent.com/9265181/235216875-dc4de0c8-8d87-4745-9834-c4c9b5389961.mp4

This is the relevant code:

return MaxWidthBox(
      maxWidth: 810,
      background: Container(color: color),
      child: ResponsiveScaledBox(
        width: ResponsiveValue<double>(
          context,
          defaultValue: 810,
          conditionalValues: [
            const Condition.equals(name: MOBILE, value: 450),
          ],
        ).value,
        child: child,
      ),
    );