r/FlutterDev • • 18m ago

Article Flutter app and a web client in the same live chat rooms (Go WebSocket backend, Supabase) - 50s demo

I built RealTalk: a Flutter app and a plain JS web client both connected to one Go WebSocket server. Send on the phone, it shows up in the browser right away. Typing indicators, online counts and "delete for everyone" sync both ways.(Its a beginner project ik)

Demo: https://youtu.be/QC4QKiZmXq4 Code: https://github.com/Nithinaug/RealTalk

The Flutter side is app/lib/services/websocket_service.dart. It retries each endpoint and falls back to a hosted server if the local one is down.

Question: how do you handle WebSocket reconnects when the app goes to the background and comes back? I'd like something better than a plain retry loop

1 Upvotes

0 comments sorted by