Change getPage() to be StatelessWidget #155
hoffmannkrzysztof
started this conversation in
General
Replies: 1 comment
|
Agree with this, I avoid using functions that return widgets as much as possible, definitely something to keep in mind when we rewrite this page. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
While checking the code. I noticed that there is a function that returns Widget. It should not be like that. If you do, it is a performance issue as this widget cannot be reused in the widget tree and it is rebuilt every time. Its better to replace getPage() to StatelessWidget with two parameters: bool firstLoad, WorkoutData workoutData and use ThemeProvider internally.
All reactions