diff --git a/packages/bloc/lib/src/cubit.dart b/packages/bloc/lib/src/cubit.dart index cbd0a3ab560..32a3cd9cd92 100644 --- a/packages/bloc/lib/src/cubit.dart +++ b/packages/bloc/lib/src/cubit.dart @@ -21,4 +21,10 @@ import 'package:bloc/bloc.dart'; abstract class Cubit extends BlocBase { /// {@macro cubit} Cubit(State initialState) : super(initialState); + + @override + void emit(State state) { + if (isClosed) return; + super.emit(state); + } }