Flutter Bloc Pattern 8.0.0 Call API
Let's Learn how to call API/Webservices using bloc pattern of flutter What is bloc? So as per official site of Bloc . The goal of this package is to make it easy to implement the BLoC Design Pattern (Business Logic Component). This design pattern helps to separate presentation from business logic . Following the BLoC pattern facilitates testability and reusability. This package abstracts reactive aspects of the pattern allowing developers to focus on writing the business logic. Bloc A Bloc is a more advanced class which relies on events to trigger state changes rather than functions. Bloc also extends BlocBase which means it has a similar public API as Cubit . However, rather than calling a function on a Bloc and directly emitting a new state , Blocs receive events and convert the incoming events into ...