onReady method
StreamSubscription<Map<HostEventType, dynamic> >
onReady({
- required HostReadyHandler handler,
inherited
Implementation
@override
StreamSubscription<Map<HostEventType, dynamic>> onReady({
required HostReadyHandler handler,
}) {
final subsription = h.eventStream.listen((event) {
if (event.containsKey(HostEventType.ready)) {
handler(hostId: event.values.first);
}
});
h.readyListenerHandlers
.update(handler, (value) => subsription, ifAbsent: () => subsription);
return subsription;
}