onOpen method

void onOpen(
  1. void callback(
    1. String id
    )
)

Listen for when the peer is open and connected to the signaling server.

Implementation

void onOpen(void Function(String id) callback) {
  on(PeerEvent.open.name, null, (ev, context) {
    callback(ev.eventData as String);
  });
}