A real-time cross-platform chat app built with Flutter and Firebase. Features secure authentication, live messaging, image sharing, push notifications, and Cloud Storage — all wrapped in a clean, responsive Material UI.
- User Authentication — Secure sign-up and login via Firebase Auth (Email/Password)
- Real-Time Messaging — Instant message delivery powered by Cloud Firestore
- Image Sharing — Pick and send images from device gallery using
image_picker+ Firebase Storage - Push Notifications — Background and foreground notifications via Firebase Cloud Messaging (FCM)
- Cloud Functions — Server-side logic with Firebase Functions (in
/functions) - User Profiles — Custom display name and avatar management
- Chat Rooms — Clean conversation list with real-time updates
- Fully Responsive — Smooth UI across Android and iOS
| Technology | Purpose |
|---|---|
| Flutter | UI Framework |
| Dart | Programming Language |
| Firebase Auth | User Authentication |
| Cloud Firestore | Real-Time Database |
| Firebase Storage | Image & Media Uploads |
| Firebase Messaging | Push Notifications |
| Firebase Functions | Server-Side Logic |
| image_picker | Device Gallery Access |
Flutter-Chat-Application/
├── android/ # Android platform files
├── ios/ # iOS platform files
├── linux/ # Linux desktop support
├── macos/ # macOS desktop support
├── web/ # Web support
├── windows/ # Windows desktop support
├── assets/
│ └── images/
│ └── chat.png # App logo / splash asset
├── functions/ # Firebase Cloud Functions
├── lib/ # Main Dart source code
│ ├── main.dart # App entry point
│ ├── models/ # Data models (User, Message)
│ ├── screens/ # UI screens (Auth, Chat, Profile)
│ ├── widgets/ # Reusable UI components
│ └── services/ # Firebase service wrappers
├── test/ # Unit and widget tests
├── firebase.json # Firebase project config
├── pubspec.yaml # Dependencies
└── README.md
Make sure you have the following installed:
- Flutter SDK (Dart SDK
^3.8.1) - Firebase CLI —
npm install -g firebase-tools - Android Studio / Xcode (for mobile targets)
- A Firebase project set up at console.firebase.google.com
-
Clone the repository
git clone https://github.com/gopal5587/Flutter-Chat-Application.git cd Flutter-Chat-Application -
Install Flutter dependencies
flutter pub get
-
Configure Firebase
- Create a project in Firebase Console
- Add Android and/or iOS apps to the project
- Download and place the config files:
- Android →
android/app/google-services.json - iOS →
ios/Runner/GoogleService-Info.plist
- Android →
- Enable Email/Password under Authentication → Sign-in method
- Create a Firestore database (start in test mode)
- Enable Firebase Storage
- Enable Firebase Cloud Messaging
-
Run the app
flutter run
cd functions
npm install
firebase deploy --only functions# Android APK
flutter build apk --release
# iOS (requires macOS + Xcode)
flutter build ios --release| Platform | Supported |
|---|---|
| Android | ✅ |
| iOS | ✅ |
| Web | ✅ |
| Windows | ✅ |
| macOS | ✅ |
| Linux | ✅ |
dependencies:
firebase_core: ^3.15.2 # Firebase initialization
firebase_auth: ^5.7.0 # User authentication
firebase_storage: ^12.4.10 # Image/media uploads
cloud_firestore: ^5.6.12 # Real-time messaging database
firebase_messaging: ^15.2.10 # Push notifications
image_picker: ^1.1.2 # Pick images from gallery/camera
cupertino_icons: ^1.0.8 # iOS-style icons// Firestore
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /messages/{message} {
allow read, write: if request.auth != null;
}
match /users/{userId} {
allow read: if request.auth != null;
allow write: if request.auth.uid == userId;
}
}
}
⚠️ Never leave Firestore in test mode for production. Always secure your rules.
Contributions are welcome! To contribute:
- Fork the repository
- Create a new branch —
git checkout -b feature/your-feature - Commit your changes —
git commit -m 'Add your feature' - Push to the branch —
git push origin feature/your-feature - Open a Pull Request
This project is open-source and available under the MIT License.
gopal5587
- GitHub: @gopal5587
Built with ❤️ using Flutter & Firebase