Flutter: Breaking the BloC Rules
BloC is a common UI pattern in the Flutter world. Google originally created the idea early on in Flutter’s life. Since its inception, the pattern has taken several forms, and now the most popular approach is to use the library named after the pattern. There is no real official BloC pattern other than what Google articulated in the original talk. The closest documentation may be this article that the Flutter documentation links to. However, the pattern has evolved over time and picked up several characteristics, core concepts, and unofficial rules. In the ongoing flutter BLoC vs Riverpod comparison, this article discusses BloC rules and when it may be appropriate to bend or break them. The purpose is to show you that following BloC conventions only sometimes results in the best possible code and that the strict rules may not apply to your situation. Overview The...