socket.io-client-dart
socket.io-client-dart copied to clipboard
Would be great to somehow catch when connection with the server is down.
If I'm not mistaken socket.onDisconnect used to work but now the only way to catch connection problem is like this:
socket?.onError((data) {
if (data.message == 'Connection refused')
Because of this socket.connected stays true even if the server is down.