Skip to content
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

Root widget gets initialized twice #192

Open
ali-thowfeek opened this issue Apr 15, 2020 · 1 comment · May be fixed by #198
Open

Root widget gets initialized twice #192

ali-thowfeek opened this issue Apr 15, 2020 · 1 comment · May be fixed by #198

Comments

@ali-thowfeek
Copy link
Contributor

Description
The root widget HomeScreen widget gets initialized twice at app start.
ie. initState() runs twice which is affects all it children, making them initialize freshly.

Possible cause
The implementation of the DropdownBanner package.

@ali-thowfeek
Copy link
Contributor Author

ali-thowfeek commented Feb 18, 2021

@sachinPramodya this issue still persists. The main cause of this issue is as below.

https://www.github.com/ICTASL/MyHealthApp/tree/master/lib/main.dart

In the above file, line 38 (as of now) you can see that a global key variable is being declared in the build method, which very bad practice and also causes issues. This has been fixed in #198 by @avinath1998

Please do the necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant