GitHub language count Repository size GitHub last commit License Stargazers Feito por Gabriela Tchian

🏁 Flutter with Firebase Cloud Messaging - In progress 🏁

✅ [Android] Receive notifications while app in foreground or background
✅ [Web] Receive notifications while app in foreground or background
❌ [IOS] Receive notifications while app in foreground or background

✅ [Android] Send notifications
✅ [Web] Send notifications
❌ [IOS] Send notifications

✅ [Android] Save all notifications in a firebase database
✅ [Web] Save all notifications in a firebase database before sending then
❌ [IOS] Save all notifications in a firebase database

AboutHow to run itTechnologiesAuthorLicense

💻 About the project

This project was created so that I would learn how to receive and send notifications via firebase's cloud messaging service, while also saving it in firebase's database for notification management.


🚀 How to run it


📝 Pre requirements

Before beginning, you'll need to have installed the following tools in your machine: Git, Chrome, Flutter, FlutterFire CLI, an editor like VSCode.

You'll also need to have an account on Google's Firebase and a project created to configure the app.

⚙️ Configuring App

Before starting, you'll need copy whats inside the file /lib/firebase_options.dart to another file, it'll be substitute after you run the following commands. To configure the application, you'll need to run the following commands:

# Clone the repository
$ git clone git@github.com:gabitchian/flutter-fcm.git

# Access the repositories's folder
$ cd flutter-fcm

# Configure project for firebase
$ flutterfire configure

When running futterfire configure, you'll be prompted with a few questions:

  • The project that will be connected to your App: you can create one while configuring or select one that was already created.

  • What plataforms you want to configure support: you should select android, IOS and Web for this example

  • It'll probably ask if you want to substitute your current configuration, mark yes

    After configuring it, you'll need to get the current values on the /lib/firebase_options.dart file to their respective variable in the .env-example and the web/firebase-messaging-sw-example.js. Then you can rename .env-example to .env and web/firebase-messaging-sw-example.js to web/firebase-messaging-sw.js and also so paste back to /lib/firebase_options.dart what you saved in another temporary file.


🧭 Running App

# Clone the repository
$ git clone git@github.com:gabitchian/flutter-fcm.git

# Access the repositories's folder
$ cd flutter-fcm

# Run on the opened emulator, such as Android or IOS device
$ flutter run

# Or
$ flutter run -d chrome
# Run on the browser, your app will open in a new tab automatically

🛠 Technologies

The following tools were use on this project:

Utils


👩‍🚀 Author

Gabi Tchian


Gabriela Tchian

Made by Gabriela Tchian

👋 Contact me at:

Linkedin Badge Gmail Badge


📝 License

This project is under the MIT license.