Skip to main content
The Courier Flutter SDK gives you prebuilt widgets and Dart APIs. It handles authentication, token management, and real-time delivery on iOS and Android. This page is the Flutter reference: what to install, how to configure both native projects, and the Dart API surface. Each flow is written once and applies to every platform. Available on GitHub and pub.dev.

Installation

iOS setup

In ios/Runner/AppDelegate.swift, change FlutterAppDelegate to CourierFlutterDelegate and keep the rest of the file. CourierFlutterDelegate carries the APNs token and the push callbacks into Dart.

Android setup

1

Add the Jitpack repository

In android/build.gradle.kts (or android/build.gradle in older apps), add JitPack to allprojects:
2

Extend CourierFlutterActivity

In MainActivity. This is what lets the SDK persist user state across app sessions.

Authentication

Courier authenticates with a JWT that your backend mints with your Courier API key, never in client code. Authenticate users covers the token flow, scope strings, reading auth state, signing out, and token refresh. Using the EU datacenter? See EU setup. Credentials persist across app sessions, so you sign in once per user rather than on every launch.

Inbox

Add an inbox is the setup flow. These are the types it uses on Flutter. Every callback and action these expose is documented per platform in Data and actions.
Custom Inbox list item rendering

A list item rendered by the app instead of the prebuilt widget

Inbox theme

With no CourierInboxTheme, the widget takes its styling from your app’s Flutter Theme:
  • Button style from Theme.of(context).elevatedButtonTheme.style
  • Loading and unread indicator color from Theme.of(context).primaryColor
  • Text styles from Theme.of(context).textTheme
Pass a theme to override those. Light and dark themes are separate.
Default Inbox on iOSDefault Inbox on Android

Default Inbox on iOS and Android

Styled Inbox on iOSStyled Inbox on Android

Styled Inbox on iOS and Android

Branding from Courier Studio also applies. The SDK reads your brand’s primary color.

Push notifications

Set up push notifications is the setup flow, from connecting APNs and FCM to a device that receives push. It covers the native wiring above, setTokenForProvider, permission, and reading the payload on tap.
Push notifications require a physical device. Simulators and emulators don’t reliably support push token registration or notification delivery.
On iOS, add a Notification Service Extension to track delivery while your app is closed. If Xcode then reports Cycle inside Runner, open the Runner target’s Build Phases and drag Embed Foundation Extensions above Thin Binary.

Preferences

Add a preference center is the setup flow. These are the types it uses on Flutter.
Topics and sections are configured in the Preferences Editor. See Preferences Overview for how preference enforcement works at send time.

Preferences theme

Light and dark themes are separate, and Courier Studio branding applies automatically when you supply a brandId.

Default and 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.