Commit 7e91fc5
authored
Fix app start with a hidden window (#5838)
* Refactor window control to fix app start with a hidden window
Moved window logic from controls/window.dart to services/window.dart, converting WindowControl to WindowService and updating its integration. Updated page and core extension to use the new service, removed window overlay from view, and adjusted backend and related code to support the refactor. This change improves separation of concerns by treating window management as a service rather than a UI control.
* Add usage instructions and startup message to example
Added comments explaining how to run the example with the --hidden option using `flet run`. Also added a print statement to notify that the window is hidden on start and will show after 3 seconds.
* Refactor time picker tests and add window resize example
Refactored material time picker integration tests for improved clarity and consistency, updating dialog creation and page update order. Added a new example for window resizing in desktop apps. Updated golden image and other related test files.
* Fix test flakiness in test_basic by updating page state
Added explicit page update and await pump_and_settle before opening the time picker in test_basic. This ensures the page is fully rendered and stable before interaction, reducing test flakiness.
* Remove rethrow in backend connection error handler
Eliminated the rethrow statement in the FletBackend connection error handler to prevent exceptions from propagating and to handle errors more gracefully.1 parent 725f1af commit 7e91fc5
File tree
13 files changed
+253
-203
lines changed- packages/flet/lib/src
- controls
- services
- sdk/python
- examples/controls/page
- packages/flet/integration_tests
- controls/material
- examples
- core
- cupertino
- material
13 files changed
+253
-203
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| 102 | + | |
| 103 | + | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
102 | 108 | | |
103 | 109 | | |
| 110 | + | |
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| |||
109 | 116 | | |
110 | 117 | | |
111 | 118 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 119 | + | |
132 | 120 | | |
133 | 121 | | |
134 | 122 | | |
| |||
148 | 136 | | |
149 | 137 | | |
150 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
151 | 143 | | |
152 | 144 | | |
153 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
154 | 193 | | |
155 | 194 | | |
156 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | 171 | | |
176 | 172 | | |
177 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
195 | 196 | | |
196 | 197 | | |
197 | 198 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
214 | | - | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
336 | | - | |
| 337 | + | |
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
| |||
470 | 471 | | |
471 | 472 | | |
472 | 473 | | |
473 | | - | |
474 | | - | |
| 474 | + | |
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
| |||
117 | 116 | | |
118 | 117 | | |
119 | 118 | | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
361 | | - | |
362 | | - | |
363 | 361 | | |
364 | 362 | | |
365 | 363 | | |
| |||
386 | 384 | | |
387 | 385 | | |
388 | 386 | | |
| 387 | + | |
| 388 | + | |
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| |||
0 commit comments