A Flutter chat application demonstrating real-time messaging using Redis.
This project is a Flutter-based chat app that connects to a Redis server for real-time messaging, presence detection, and typing indicators. It uses Redis Pub/Sub channels to broadcast chat messages, typing status, and user presence. The app also stores chat history locally using Hive and manages unique client IDs with SharedPreferences.
- Real-time chat messaging using Redis Pub/Sub
- User presence detection (online/offline status)
- Typing indicators for active users
- Local chat history storage with Hive database
- Persistent unique client IDs using SharedPreferences
- Cross-platform support (Android, iOS, Web, Desktop)
- Flutter SDK installed: Flutter Installation Guide
- Access to a Redis server (the project uses a remote Redis instance; update credentials in
lib/main.dart
if needed) - An IDE such as VSCode or Android Studio
-
Clone the repository:
git clone <repository-url> cd redis_learn
-
Install dependencies:
flutter pub get
-
Ensure the Redis server credentials in
lib/main.dart
are correct and accessible.
Run the app on your desired platform:
flutter run
You can specify a device or emulator as needed.
lib/main.dart
- Main Flutter app source code implementing chat functionality with Redis integration.android/
,ios/
,macos/
,windows/
,linux/
,web/
- Platform-specific files for Flutter.pubspec.yaml
- Flutter project configuration and dependencies.
redis
- Redis client for Dartuuid
- For generating unique client IDsshared_preferences
- For storing client IDs persistentlyhive_flutter
- Local database for storing chat messages
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.