This repository provides a complete tutorial on implementing Firebase Cloud Messaging (FCM) and Flutter Local Notifications for Android and iOS applications. The tutorial walks through setting up FCM, handling background and foreground notifications, managing permissions, and displaying notifications with custom configurations for both platforms.
Watch the complete video tutorial here: YouTube Tutorial
The video tutorial includes:
- Setting up Firebase for FCM in a Flutter project.
- Implementing background and foreground notification handlers.
- Configuring Android and iOS for local notifications.
- Step-by-step guidance on testing notifications in real-world scenarios.
- Real-time push notifications using Firebase Cloud Messaging
- Foreground, background, and terminated state message handling
- Local notifications display for Android and iOS
- Permissions management for notifications
- Topic subscription and unsubscription functionality
-
Clone the Repository
git clone https://github.com/Amanullahgit/Flutter-FCM cd Flutter-FCM
-
Install Dependencies Run the following command to install required packages:
flutter pub get
-
Configure Firebase
- Add your
google-services.json
andGoogleService-Info.plist
files to the respective directories for Android and iOS. - Follow the tutorial to set up Firebase Here.
- Add your
-
Run the App Use the following command to run the app on a connected device or emulator:
flutter run
After following the tutorial and configuring Firebase, you can send test notifications from the Firebase console to see real-time notifications on your device.
For questions, feel free to reach out in the GitHub Issues section or leave a comment on the YouTube video.