Skip to main content
Flutter push setup combines native platform configuration with one SDK registration call. Your app obtains the push token through Firebase or the native platform, then passes that token to the social.plus Flutter SDK after the user is signed in.
The Flutter SDK does not create Firebase projects, APNs certificates, or platform permission prompts for you. It registers the token that your app receives from those platform systems.

SDK Surface

Parameters

1. Configure Platform Push

Configure Firebase Messaging for Flutter using your app’s Firebase project:
  • Add the Firebase packages that match your FlutterFire setup.
  • Run FlutterFire configuration for Android and iOS.
  • Add google-services.json for Android.
  • Add GoogleService-Info.plist for iOS.
  • Enable Push Notifications capability for the iOS target.
  • Upload the required push credentials in the social.plus Console under Settings > Push Notifications.
Keep Firebase and FlutterFire package versions in your app, not hardcoded in this docs page. Follow the version matrix for your Flutter, Firebase, and React Native toolchain.

2. Register the Token

Once your app has a token and the user is signed in to social.plus, register the device token with the SDK.
Call the same SDK method again when Firebase reports a refreshed token. The last registration replaces the previous token state for this app installation.

3. Unregister on Sign-Out

Unregister when the user signs out or when this app installation should stop receiving push notifications for the current social.plus user.

Setup Checklist

  • Firebase Messaging is configured for the Flutter app.
  • Android and iOS platform files are present in the correct native projects.
  • APNs or FCM credentials are uploaded in the social.plus Console.
  • The signed-in user token is registered through AmityCoreClient.registerDeviceNotification(fcmToken).
  • The device is unregistered through AmityCoreClient.unregisterDeviceNotification() on sign-out.