Introduction

There might be cases where we need to implement real-time communication in Flutter—for example, when building a chat or stock trading application. WebSocket offers real-time two-way communication between clients and servers.

The alternative to WebSocket is polling, where instead of delivering messages in real-time to the client, the clients keep checking the server after a time interval. Polling is an option that could work for your application, but this takes a lot of computing resources, especially on mobile, which will drain the device’s battery.

We’ll work on the following app in this lesson:

Get hands-on with 1400+ tech skills courses.