-
Notifications
You must be signed in to change notification settings - Fork 151
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
Breakpoint value is null on initial build #155
Comments
Thank you for reporting with the info. |
Hello, has this been resolved? @jlin5 were you able to figure something out? I'm having the same problem :/ |
Same problem here :( Any fixes or temporary work around to address that initial null value? @jlin5 @rayliverified I really want to use this framework in my new app. Thank you 🙏🏽 |
@pulsafi @jesus-villalobos @rayliverified I'm not sure what happened but the screen doesn't change suddenly anymore when I run the sample code. The breakpoint value is still null though on initial build. I noticed that in version 0.2.0, there was a conditional that would return an empty background if the screenWidth is 0. ResponsiveFramework/lib/responsive_wrapper.dart Lines 668 to 680 in 08a673f
The fix would be to add a similar conditional before InheritedResponsiveBreakpoints in the latest version.
ResponsiveFramework/lib/responsive_breakpoints.dart Lines 264 to 274 in 03bf2ae
|
Thank you for looking into this @jlin5 🙏🏽 From my understanding, though, there is nothing that I can do on my end to catch this Null? Should I just add a check for if screenSize is Null? Or would we just have to wait until @rayliverified gets around to addressing this? Thanks :) |
You're right, the initial frame 0 width and height issue is still present in the Flutter framework. Let me read through the issues and see how people want to solve this. Solution 1: Empty container We're currently at Solution 2. |
I noticed that the breakpoint value will be null on initial build and a subsequent build update would have the breakpoint value. This would cause a sudden change on the screen which is most noticeable when using the SingleChildScrollView widget. I used an iPad (10th generation) simulator and ran Flutter's hot restart multiple times to see the screen changing size. This is happening on v1.0.0 to v1.1.1.
Print logs:
Code:
The text was updated successfully, but these errors were encountered: