isStreamClosureError static method
Checks if an error is a stream closure error that should be silently handled
Implementation
static bool isStreamClosureError(dynamic error) {
return error is StateError &&
error.message.contains('Cannot add event after closing');
}