1 year ago
#67773
kobi malul
Flutter opening textfield reloaded the application
just sharing this here.
for some reason, after I added a global variable for global width and height (so I don't have to call mediaQuery all the time), whenever I opened text fields, the app reloaded or crashed the text editing.
I declared the variables in the main. dart in the global space, but set their values on the splash screen page.
the issue was weirdly resolved by changing the app that main runs to a builder with a material app (and not directly material app) and set the value there instead of the splash screen.
if anyone has any clue as to why this occurred, I would be grateful to know.
flutter
textfield
global
splash-screen
0 Answers
Your Answer