xxxxxxxxxx
// Bloc = Business Logic Components
// Events => Bloc => State
// "Events are dispatched from the UI" => "they arrive inside the Bloc + Bloc
// receives events, executes some appropriate business logic in case of
// Clean Architecture, it going to call a usecase + the usecase will throw out
// data + data will be put into a State" => "State will be emitted from the
// Bloc back to the UI widgets, which will do something useful & Update The UI".
xxxxxxxxxx
class CounterCubit extends Cubit<int> {
CounterCubit() : super(0);
void increment() => emit(state + 1);
void decrement() => emit(state - 1);
}
xxxxxxxxxx
//Bloc is a state management library which supports Dart, Flutter & AngularDart.