A Cubit is similar to Bloc but has no notion of events and relies on methods to emit new states . Every Cubit requires an initial state which will be the state of the Cubit before emit has been called. The current state of a Cubit can be accessed via the state getter.
Read moreWhat is BLoC used for?
What is Bloc? Bloc is a design pattern created by Google to help separate business logic from the presentation layer and enable a developer to reuse code more efficiently .
Read moreShould I use BLoC or cubit?
Blocs are more verbose than Cubits . Additional boilerplate — shown in the example below — is needed for states and events. But, in my opinion, this is a price worth paying. In the long run, traceability is a precondition for the manageability of your app.
Read more