Step 1: Set Up a Firebase Project
Before you can use FlutterFlow's push notifications feature, you need to have a Firebase project set up. Infer the following steps to do that:
- Go to Firebase's website and log into your Google account.
- Click on the 'Go to console' button located at the upper right-hand corner of the page.
- Click on the 'Create a project' button in the Firebase console, enter your project name and click 'Continue'.
- Choose if you want Google Analytics linked to your Firebase project. Once you've made a selection, click 'Continue'.
- If you chose to use Google Analytics, you will pick an account for it (or create a new one). Click 'Create project' and wait for Google to spin-up your new project.
Step 2: Link Firebase Project to FlutterFlow
Now that you have a Firebase project, you need to link it with FlutterFlow. Follow these steps:
- From your FlutterFlow project, click the Firebase icon in the left sidebar. It will guide you to a section where you sign in with your Firebase account.
- After signing in, select the Firebase project you just created from the list of available projects.
- Follow the on-screen instructions to download the 'google-services.json' file which you will upload to FlutterFlow to complete the process.
Step 3: Enable Push Notifications in FlutterFlow
Now, you can enable push notifications. Here's how:
- Still in your FlutterFlow project, from the left sidebar, click on the 'Settings' icon. This will open up another sidebar that displays various options.
- Click on 'Push Notifications' and toggle on the option to enable push notifications.
Step 4: Configure the Push Notification's Settings
To personalize your notifications, perform these steps:
- Still in the 'Push Notifications' section, enter the name of your application and provide the server key.
- For the name, use the exact name of your application.
- For the server key, go back to your Firebase account, click on the gear-shaped settings icon, select 'Project settings', then click the 'Cloud Messaging' tab. Here, you will find the server key. Copy and paste it into the corresponding field in FlutterFlow.
Step 5: Create a New Push Notification
You're now set to create your first push notification. Follow these instructions:
- From the left sidebar on FlutterFlow, click on the 'Push Notifications' icon.
- Click on the '+' button to create a new push notification.
- Enter the contents of your notifications. You can also select if you want to send it immediately or at a later time.
Step 6: Send the Push Notification
The final step is easy. Just click the 'Send' button and your notification will be sent to all users subscribed to the channel. This completes your tutorial on how to use FlutterFlow's built-in push notification feature.