It’s easy to emit() all the states in flutter bloc or cubit. Just do the below
emit([...state]);
If you are using Cubit, then call the above code from inside a method() in your extended cubit class.
If you are using BLoC, then call the above code from inside event() in your extended BLoC class.
Inside the emit() function, we emit list of all the states. So we use [] for list.
We also used spread operators(…), they represent all the states, objects or data.
Flutter BLoC App