onceConnection method
void
onceConnection({
- required HostConnectionHandler handler,
inherited
Implementation
void onceConnection({required handler}) {
// ignore: cancel_subscriptions
var subscription = onConnection(handler: handler);
subscription.onData((data) {
if (data.containsKey(HostEventType.connection))
offConnection(handler: handler);
});
}