onDiagnostic method
StreamSubscription<Map<HostEventType, dynamic> >
onDiagnostic({
- required DiagnosticHandler handler,
inherited
Implementation
@override
StreamSubscription<Map<HostEventType, dynamic>> onDiagnostic({
required DiagnosticHandler handler,
}) {
final subsription = h.eventStream.listen((data) {
if (data.containsKey(HostEventType.diagnostic)) {
handler(message: data.values.first);
}
});
h.diagntosticListenerHandlers
.update(handler, (value) => subsription, ifAbsent: () => subsription);
return subsription;
}