Flutter Push

Learn how to handle push notifications in Flutter.

Push Notifications

Android

To use Push Notifications out of the box using CleverTap, add the following entries to your AndroidManifest.xml

<application>
         ....
         ....
        <service android:name="com.clevertap.android.sdk.pushnotification.fcm.FcmMessageListenerService">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT" />
            </intent-filter>
        </service>

 </application>

Creating Notification Channel

CleverTapPlugin.createNotificationChannel("fluttertest", "Flutter Test", "Flutter Test", 3, true);

Delete Notification Channel

CleverTapPlugin.deleteNotificationChannel(“channelId”);

Creating a group notification channel

CleverTapPlugin.createNotificationChannelGroup(“groupId”, “groupName”);

Delete a group notification channel

CleverTapPlugin.deleteNotificationChannelGroup(“channelId”);

iOS

To set up and register for push notifications complete the following steps:

  1. Set up push notifications for your app.

  2. Call the following from your Dart.

CleverTapPlugin.registerForPush();

Did this page help you?