Courier Flutter SDK
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.
Installation
flutter pub add courier_flutter
Requires iOS 15.0+, Android SDK 23+, and Gradle 8.4+. Run cd ios && pod install after adding the package.
Quick Start
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())
Documentation
Full documentation: courier.com/docs/sdk-libraries/flutter
Getting Started
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. |
Example Projects
| Project Link |
|---|
Example
|
Share feedback with Courier
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:
Libraries
- client/brand_client
- client/courier_client
- client/inbox_client
- client/preference_client
- client/token_client
- client/tracking_client
- courier_flutter
- courier_flutter_channels
- courier_preference_channel
- courier_preference_status
- courier_provider
- ios_foreground_notification_presentation_options
- models/courier_authentication_listener
- models/courier_brand
- models/courier_device
- models/courier_inbox_listener
- models/courier_inbox_messages
- models/courier_pagination
- models/courier_push_listener
- models/courier_tracking_event
- models/courier_user_preferences
- models/inbox_action
- models/inbox_feed
- models/inbox_message
- models/inbox_message_set
- notification_permission_status
- semantic_property
- ui/courier_theme
- ui/courier_theme_builder
- ui/inbox/courier_inbox
- ui/inbox/courier_inbox_list_item
- ui/inbox/courier_inbox_pagination_item
- ui/inbox/courier_inbox_theme
- ui/inbox/swipable_container
- ui/preferences/courier_preferences
- ui/preferences/courier_preferences_list_item
- ui/preferences/courier_preferences_section
- ui/preferences/courier_preferences_sheet
- ui/preferences/courier_preferences_theme
- ui/watermark
- utils