Comments (6)
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.
So far, the v0.2.0 solution was an empty container with a configurable color.
Solution 1: Empty container
Complaints: Black, flickering.
Solution 2: Empty container with configurable color
We're currently at Solution 2.
I'll add Solution 2 back after doing some investigation into if it's compatible with initial loading screens / indicators.
from responsiveframework.
Thank you for reporting with the info.
This could be the null size on initial frame issue.
MediaQuery return null on the initial frame which makes layouts that rely on it not work on the first frame.
from responsiveframework.
Hello, has this been resolved? @jlin5 were you able to figure something out? I'm having the same problem :/
from responsiveframework.
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 🙏🏽
from responsiveframework.
@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.
// Initialization check. Window measurements not available until postFrameCallback.
// Return first frame with empty widget.
if (screenWidth == 0) {
return Container();
}
ResponsiveFramework/lib/responsive_breakpoints.dart
Lines 264 to 274 in 03bf2ae
from responsiveframework.
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 :)
from responsiveframework.
Related Issues (20)
- Unexpected null value HOT 4
- nonexistent breakpoint on migration from 0.2.0 -> 1.1.1 HOT 1
- Condition on ResponsiveVisibility requires a value in v1 HOT 2
- When breakpointsLandscape is defined, it will always ignore breakpoints. HOT 1
- [Feature Request]
- [BUGS] Button in ResponsiveRowColumnItem cannot expanded HOT 2
- ResponsiveScaledBox in showDialog does not work properly
- Can we use the new version with GetX package?
- Error when using ReorderableListView inside ResponsiveScaledBox ( v1.1.1 and below) HOT 3
- User finger resize
- Font getting squeezed on iPhone 11 with iOS 16.0
- GoogleMap marker's tap area is misplaced on the web
- ResponsiveWrapper is not working HOT 3
- ResponsiveVisibility error HOT 2
- withNoTextScaling not working in letest version HOT 4
- Error null when defaultValue on ResponsiveValue not specified HOT 2
- type 'Null' is not a subtype of type 'double' in type cast HOT 2
- Positioning Issue with Draggable Widget HOT 5
- ResponsiveFramework + EasyLoading in builder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from responsiveframework.