onClose method

void onClose(
  1. void callback()
)

Listen for when the connection is closed.

Implementation

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