This change will solve the inconsistency between Bloc and Cubit if emit is used after the Bloc/Cubit is closed. (Issue #4165)
The added emit override makes sure no error is thrown if emit is called and the cubit is already closed. Instead, the emit will be simply ignored just like a Bloc.
Type of Change
[ ] โจ New feature (non-breaking change which adds functionality)
[ ] ๐ ๏ธ Bug fix (non-breaking change which fixes an issue)
[X] โ Breaking change (fix or feature that would cause existing functionality to change)
Status
IN DEVELOPMENT
Breaking Changes
YES
Description
This change will solve the inconsistency between Bloc and Cubit if emit is used after the Bloc/Cubit is closed. (Issue #4165) The added emit override makes sure no error is thrown if emit is called and the cubit is already closed. Instead, the emit will be simply ignored just like a Bloc.
Type of Change