onClose method

void onClose(
  1. void callback()
)

Listen for when the peer is closed.

Implementation

void onClose(void Function() callback) {
  on(PeerEvent.close.name, null, (ev, context) {
    callback();
  });
}