Skip to main content
The Courier Flutter SDK provides prebuilt widgets and APIs for building notification experiences in Dart. It handles authentication, token management, and real-time message delivery across iOS and Android from a single codebase.
  • Inbox — prebuilt notification center widget with theming and custom rendering
  • Push Notifications — automatic token syncing and delivery tracking for APNS and FCM
  • Preferences — prebuilt widget for users to manage their notification settings
Available on GitHub and pub.dev.
The SDK’s intl dependency (>=0.19.0 <1.0.0) is incompatible with Flutter 3.32+ (Dart 3.7+), which ships intl 1.0. If you encounter dependency resolution errors on newer Flutter versions, pin intl: ^0.19.0 in your app’s pubspec.yaml or wait for an SDK update that widens the constraint.

Installation

iOS Setup

Update your deployment target to iOS 15+, then install the CocoaPod:

Android Setup

1

Add the Jitpack repository

In your android/build.gradle:
2

Set minimum SDK version

In your app/build.gradle:
3

Gradle sync

Your app must support at least Gradle 8.4.

Authentication

All SDK features (Inbox, Push, Preferences) require a signed-in user. Authentication is JWT-based; your backend generates a token and the SDK manages credentials across app sessions.
For a full walkthrough of JWT generation, see the Inbox Authentication guide.
1

Generate a JWT on your backend

Call the Issue Token endpoint from your server:
2

Sign in the user

Pass the JWT to the SDK where you manage user state. Credentials persist across app sessions. If the token expires, generate a new one from your backend and call signIn again; the SDK does not handle token refresh automatically.
3

Sign out when done

Authentication state

Inbox

Courier Inbox provides a prebuilt notification center widget. It supports theming, custom renderers, and real-time updates. The widget automatically adapts to your app’s Flutter Theme unless you provide a custom CourierInboxTheme.
Inbox requires the Courier Inbox provider to be enabled in your workspace. If using JWT authentication, enable JWT support in the provider settings.JWT toggle in Courier provider settings
For an overview of how Courier Inbox works and how to send messages to it from your backend, see Get Started with Inbox and Send an Inbox Message.

Prebuilt Widget

Default Inbox on iOSDefault Inbox on Android

Default Inbox on iOS and Android

The widget automatically picks up your app’s Flutter theme:
  • Button style from Theme.of(context).elevatedButtonTheme.style
  • Loading/unread indicator color from Theme.of(context).primaryColor
  • Text styles from Theme.of(context).textTheme

Theming

Pass a CourierInboxTheme to override the default styles. This controls fonts, colors, unread indicators, swipe actions, tab styles, and button styles.
Styled Inbox on iOSStyled Inbox on Android

Styled Inbox on iOS and Android

You can also apply branding from Courier Studio. The SDK supports primary color and footer visibility from your brand settings.

Custom Inbox UI

For full control over rendering, use addInboxListener to receive raw message data and build your own UI:
Custom Inbox list item rendering

Custom Inbox list item rendering

Message Actions

Track every event a Courier message can receive:

Reading the feed

Push Notifications

The SDK simplifies push notification setup with automatic token syncing and delivery tracking for both APNS (iOS) and FCM (Android).
Push notifications require a physical device. Simulators and emulators do not reliably support push token registration or notification delivery.

Provider Setup

Configure your push provider in the Courier dashboard:
  • iOS: APNS (recommended) or FCM
  • Android: FCM (recommended)
For step-by-step provider credential setup, see the APNS integration guide or FCM integration guide.

iOS Push Setup

1

Set the iOS deployment target

Open your iOS project and bump the minimum deployment target to iOS 15.0+, then re-install pods:
2

Extend CourierFlutterDelegate

In ios/Runner/AppDelegate.swift, import the SDK and inherit from CourierFlutterDelegate. This automatically syncs APNS tokens to Courier and forwards delivery / click events to Dart.
3

Enable the Push Notifications capability

In Xcode: select your target > Signing & Capabilities > add Push Notifications.
4

Add a Notification Service Extension (recommended)

Required for tracking delivery when the app is not running. See the iOS SDK push setup for the full steps; the same template applies to Flutter. After adding the extension, in your project settings move Embedded Foundation Extensions above Run Scripts and below Link Binary With Libraries.
Xcode Build Phases reorder

Reorder build phases so Embedded Foundation Extensions runs before Run Scripts

Android Push Setup

Firebase is now a separate dependency. Starting with Courier Flutter 5.x (built on Courier Android 6.x), the SDK no longer bundles Firebase Messaging as a transitive dependency. Your app must add its own Firebase BoM and firebase-messaging artifact so you can subclass FirebaseMessagingService.
1

Add Firebase to your app

Register your app in Firebase, download google-services.json, and place it in android/app/.In android/app/build.gradle:
Sync Gradle.
2

Extend CourierFlutterActivity

Update your MainActivity (Kotlin) to extend CourierFlutterActivity (or CourierFlutterFragmentActivity if you use a FragmentActivity). This lets the SDK forward push delivery and click events into Flutter.
3

Create a FirebaseMessagingService

Subclass Firebase’s FirebaseMessagingService directly and forward both callbacks to Courier. The SDK caches the FCM token, uploads it to Courier when a user is signed in, and broadcasts delivery events through its event bus.
4

Register the service in AndroidManifest.xml

Manual Token Syncing

Use this when you don’t want automatic syncing or when you’re integrating with a non-FCM provider.

Handling Push Events

Register a listener to respond when notifications are delivered or tapped. This is useful for deep linking, analytics, or showing in-app alerts.

Requesting Permission

Prompt the user to allow notifications (iOS shows a system dialog; on Android the call is a no-op below API 33).

Send a Test Notification

Once you’ve completed the setup above, send a test push using the Send API with push as the routing channel. See the APNS sending guide or FCM sending guide for complete examples.

Preferences

Courier Preferences provides a prebuilt widget for users to manage which notification topics and channels they subscribe to.
Topics and sections are configured in the Preferences Editor. See Preferences Overview for how preference enforcement works at send time.

Default Preferences on Flutter

Preference Modes

  • Topic mode (TopicMode()): shows subscription topics the user can toggle on or off
  • Channels mode (ChannelsMode(channels: [push, sms, email])): shows per-channel controls for each topic

Theming

Pass a CourierPreferencesTheme to customize fonts, colors, toggle styles, and section headers. Light and dark themes are both supported, and Courier Studio branding is automatically applied when a brandId is provided.

Styled Preferences on Flutter

CourierClient

For advanced use cases, CourierClient is a low-level wrapper around the Courier API. Each client holds its own credentials, so you can spin up as many as you need.

Initialization

Token Management

Inbox

Preferences

Branding

URL Tracking

Pass any tracking URL found inside a push notification payload or inbox message:
See the full Courier API reference at courier.com/docs/reference.

Inbox Overview

Learn about Courier Inbox and how to set it up

Push Integrations

Configure APNS, FCM, and other push providers

Preferences

Set up notification preference topics and channels

GitHub

Source code, examples, and changelog