closeReason method

String? closeReason()

Implementation

String? closeReason() {
  return ws.connection.state == Disconnected()
      ? (ws.connection.state as Disconnected).reason
      : null;
}