Simpler Build When Method #1521
Labels
enhancement candidate
Candidate for enhancement but additional research is needed
pkg:flutter_bloc
This issue is related to the flutter_bloc package
Projects
I think bloc builder is good when it comes to rebuilding widget. I just want to say that I feel it is a bit boilerplatey especially in the Generics part, buildWhen method and the builder method part. First, I just think that can we eliminate the bloc/cubit generic since I only wanted the state? Second, I think this "previousState.count != currentState.count" condition is the most common condition we can have in buildWhen that can be easily be replaceable with the propose feature below. For more complex condition I think its suitable to use BlocBuilder Widget.
I think this easily manageable code when we have to many widgets with the same pattern unlike above? This should only rebuild when only the state.count changes and will not be affected by other state changes.
Underlying Signature
The text was updated successfully, but these errors were encountered: