Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize not working properly after 800 pixels of width in Flutter Web #21

Closed
franarolas opened this issue Sep 9, 2020 · 5 comments
Closed

Comments

@franarolas
Copy link

franarolas commented Sep 9, 2020

So I've been testing a few things and it looks like the resize is not working properly when you have an screen width of more than 800 pixels.
As far as I know the following widgets are not working properly: TextField, TextFormField, RaisedButton.
I've shared a git project so you can see exactly what I mean:
Git responsive test project (Test it in Flutter Web with different sizes)

When the screen width is smaller than 800 pixels, it resizes the widgets as usual, but when it is bigger, it just makes them wider.
With images it works perfectly.
If you need some more information just ask for it.
Thank you.

@rayliverified
Copy link
Contributor

rayliverified commented Sep 9, 2020

The ResponsiveFramework supports responsive behaviors, autoScale, resize, and autoScaleDown.

In the code below, you can see that a resize breakpoint is set at 800.

ResponsiveBreakpoint.autoScale(425, name: MOBILE),
ResponsiveBreakpoint.**resize**(800, name: TABLET),
ResponsiveBreakpoint.resize(1000, name: DESKTOP),

Resize allows Flutter to resize the layout normally. Please play around with the responsive behaviors to understand how they affect resizing.

@franarolas
Copy link
Author

franarolas commented Sep 9, 2020

Even if I have it like that:

ResponsiveBreakpoint.resize(425, name: MOBILE),
ResponsiveBreakpoint.resize(800, name: TABLET),
ResponsiveBreakpoint.resize(1000, name: DESKTOP),

It just resizes all widgets until 800, after it, it only resizes images, font sizes(and some more)

@gcostaapps
Copy link

@franarolas I think you need to change the methods resize for autoscale to lock the UI and not make then wider.

@franarolas
Copy link
Author

@franarolas I think you need to change the methods resize for autoscale to lock the UI and not make then wider.

It is the solution that I am using right now, but I don't think that is how it should work.

@rayliverified
Copy link
Contributor

Resize is the default behavior which allows Flutter to layout normally.
If you want to increase the UI layout proportionally and scale the UI, use AutoScale instead.

Closing as working as intended. Please reopen if you have additional questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants