The Courier Flutter SDK provides prebuilt widgets and Dart APIs for adding in-app notifications, push notifications, and notification preferences to your Flutter app. It handles authentication, token management, and real-time message delivery across iOS and Android from a single codebase.
flutter pub add courier_flutterRequires iOS 15.0+, Android SDK 23+, and Gradle 8.4+. Run cd ios && pod install after adding the package.
import 'package:courier_flutter/courier_flutter.dart';
import 'package:courier_flutter/ui/inbox/courier_inbox.dart';
import 'package:courier_flutter/ui/preferences/courier_preferences.dart';
// Sign in the user (JWT generated by your backend)
await Courier.shared.signIn(
userId: "user_123",
accessToken: jwt,
);
// Add a prebuilt Inbox widget
CourierInbox(
onMessageClick: (message, index) {
message.isRead ? message.markAsUnread() : message.markAsRead();
},
)
// Add a prebuilt Preferences widget
CourierPreferences(mode: TopicMode())Full documentation: courier.com/docs/sdk-libraries/flutter
These are all the available features of the SDK.
| Feature | Description | |
|---|---|---|
| 1 |
Authentication
|
Manages user credentials between app sessions. Required if you would like to use Inbox, Push Notifications and Preferences.
|
| 2 |
Inbox
|
An in-app notification center you can use to notify your users. Comes with a prebuilt UI and also supports fully custom UIs. |
| 3 |
Push Notifications
|
Automatically manages push notification device tokens and gives convenient functions for handling push notification receiving and clicking. |
| 4 |
Preferences
|
Allow users to update which types of notifications they would like to receive. |
| 5 |
CourierClient
|
The base level API wrapper around the Courier endpoints. Useful if you have a highly customized user experience or codebase requirements. |
| Project Link |
|---|
Example
|
We want to make this the best SDK for managing notifications! Have an idea or feedback about our SDKs? Here are some links to contact us: