This is a basic chat app built with Flutter and Ably.
You can check out a short video demo of this application along with some explanation of the code.
- Clone this repo and cd to the folder containing the project files:
git clone https://github.com/ably-labs/flutter-chat-demo.git
cd flutter-chat-demo/realtime_chat_ably
-
Create a free account with Ably to get your API Key.
-
Add a file called
config.dart
in/realtime_chat_ably/lib
and paste the following:
const String AblyAPIKey = "YOUR-ABLY-API-KEY";
Replace the placeholder with your own API Key
-
Run
flutter packages get
to install the dependencies -
Open two or more simulators on your system
-
Run
flutter run -d all
to run the app on all the simulator devices
When you send a message in one of the devices, it should come up in realtime on all the devices.
Ably is a pub/sub messaging platform with a suite of integrated services to deliver complete realtime functionality directly to end-users.
This project uses Ably's Flutter plugin to enable realtime chat between any number of users.
The app's UI is adopted from Marcus Ng's YouTube video - Flutter Chat UI Tutorial | Apps From Scratch
-
All of Ably's messaging limits, broken down by package can be found in a support article.
-
If you have any questions, please leave a message to me directly on Twitter or reach out to Ably's support team at support@ably.com.
-
It'll be amazing and helpful to other developers to add more features to this chat app, please check out the open issues if you'd like to contribute to this project.