safeStreamReset static method
Safely resets a stream without throwing exceptions
Implementation
static Future<void> safeStreamReset(dynamic stream, {String? context}) async {
try {
if (stream != null && stream.reset != null) {
await stream.reset();
}
} catch (e) {
_log.warning('Error during safe stream reset${context != null ? ' ($context)' : ''}: $e');
}
}