add method
Adds an event to the bloc if it's not closed.
Parameters:
event: The event to add to the bloc.
Usage:
bloc.add(IncrementPressed());
Implementation
@override
void add(E event) {
if (!isClosed) {
super.add(event);
}
}
Adds an event to the bloc if it's not closed.
Parameters:
event: The event to add to the bloc.Usage:
bloc.add(IncrementPressed());
@override
void add(E event) {
if (!isClosed) {
super.add(event);
}
}