Skip to content

trycourier/courier-flutter

Repository files navigation

banner-flutter

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:

Courier Flutter Issues

Packages

 
 
 

Contributors