Skip to content

Commit f108d23

Browse files
committed
QUICKFIX Init Window Size
*FIX Set init window size to 0. Wait for layout initialization before drawing content.
1 parent 1648f5f commit f108d23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/responsive_wrapper.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ class _ResponsiveWrapperState extends State<ResponsiveWrapper>
129129
MediaQuery.of(context).devicePixelRatio;
130130
}
131131

132-
double windowWidth = 1;
132+
double windowWidth = 0;
133133
double getWindowWidth() {
134134
return widget.mediaQueryData?.size?.width ??
135135
MediaQuery.of(context).size.width;
136136
}
137137

138-
double windowHeight = 1;
138+
double windowHeight = 0;
139139
double getWindowHeight() {
140140
return widget.mediaQueryData?.size?.height ??
141141
MediaQuery.of(context).size.height;
@@ -144,7 +144,7 @@ class _ResponsiveWrapperState extends State<ResponsiveWrapper>
144144
get breakpoints => widget.breakpoints;
145145

146146
/// Get screen width calculation.
147-
double screenWidth = 1;
147+
double screenWidth = 0;
148148
double getScreenWidth() {
149149
activeBreakpoint = getActiveBreakpoint(windowWidth);
150150
// Check if screenWidth exceeds maxWidth.
@@ -164,7 +164,7 @@ class _ResponsiveWrapperState extends State<ResponsiveWrapper>
164164
}
165165

166166
/// Get screen height calculations.
167-
double screenHeight = 1;
167+
double screenHeight = 0;
168168
double getScreenHeight() {
169169
// Check if screenWidth exceeds maxWidth.
170170
if (widget.maxWidth != null) if (windowWidth > widget.maxWidth) {

0 commit comments

Comments
 (0)