onClose method

void onClose(
  1. void callback(
    1. dynamic
    )
)

Adds a callback handler to this WebSocket close event.

Implementation

void onClose(void Function(dynamic) callback) {
  _closeCallback = callback;
  _startCloseServices().then((_) => _onClose());
}