Websocket connection status indicator

This commit is contained in:
2024-11-15 00:52:31 +08:00
parent 8bc0da5188
commit d945b103ca
5 changed files with 69 additions and 3 deletions

View File

@ -53,6 +53,7 @@ class WebSocketProvider extends ChangeNotifier {
conn = WebSocketChannel.connect(uri);
await conn!.ready;
log('[WebSocket] Connected to server!');
isConnected = true;
} catch (err) {
if (err is WebSocketChannelException) {
log('Failed to connect to websocket: ${(err.inner as dynamic).message}');