9/20/2023 0 Comments Blocs app ratings![]() ![]() ![]() BLoC accepts the event and does something.The following is a step by step process of how BLoC pattern works. The main component of this pattern is the BLoC itself which contains a part of the app’s business logic. Step by step process of how BLoC pattern worksīefore we even go deep into the code, it is better if we actually know first how this pattern works. For now, don’t worry about streams, sinks, state management and other jargons of a BLoC.īLoC pattern is really just another way of splitting your code into layers in such a way that each component of your code can be swapped and replaced while the main function of your app still works unchanged.īLoC pattern is a way of dividing and organizing code to make it reusable. BLoC pattern is a way of dividing and organizing code to make it reusable. I will skip the formal definition of BLoC (Business Logic Component), but instead define what it is to me. By the end of this post, you should be able to understand how powerful it is and be able to use it in your projects. I will provide my own simple definitions and an example using this pattern in Flutter. This article will serve as a beginner’s guide to BLoC pattern. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |