Created
August 27, 2021 18:03
-
-
Save mingsai/244db963dd00dc623720b261b7ffd3e6 to your computer and use it in GitHub Desktop.
Flutter rebuild all widgets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _rebuildAllChildren(BuildContext context) { | |
void rebuild(Element el) { | |
el.markNeedsBuild(); | |
el.visitChildren(rebuild); | |
} | |
(context as Element).visitChildren(rebuild); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment