-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Update setBusy to avoid unnecessary reconstruction #13
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
Conversation
I think you're missing the point. We need to rebuild the widget when we setBusy because we have to use the busy value to show a loading indicator when a widget with a model is busy. It's not called for no reason. When your widget doesn't have to show a busy indicator then you don't call setBuys. It should only be used if you want to show loading indication while performing asynchronous work.
Ok, correct me if I'm wrong; for example it would not be better to have a default busy true, so it is not necessary to call notifyListeners(), and we only call it when we received the post.
From my point of view call notifyListeners(), when setBusy(true) is a wasted, cause we rebuild all the consummer with no actually new data.