Should I start Cubit then later on refactor the code to Bloc?

Issue

For the past week I have been learning the Bloc pattern. From that, I understand that I have 2 choices to use Cubit and Bloc. Cubit is for simple state, and Bloc is for complex state (that’s my understanding between the two). Should I implement Cubit first then later on refactor it to Bloc? Or it all depends on the application?

Solution

it is better to create a Bloc instead of the Cubit, but if it is for managing things like the theme or the language of the application, …, to manage a simple state as you say, create a Cubit is fast,

Answered By – lordyhas

Answer Checked By – Mildred Charles (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *