onReconnect method

void onReconnect(
  1. void callback()
)

Called when the WebSocket reconnects after a dropped connection.

Implementation

void onReconnect(void Function() callback) {
  _onReconnect = callback;
}