diff --git a/Docs/1_Authentication.md b/Docs/1_Authentication.md
deleted file mode 100644
index 74ff981..0000000
--- a/Docs/1_Authentication.md
+++ /dev/null
@@ -1,120 +0,0 @@
-> **Note**: These docs have moved to [courier.com/docs/sdk-libraries/flutter](https://www.courier.com/docs/sdk-libraries/flutter/). The content below may be outdated.
-
-# Authentication
-
-Manages user credentials between app sessions.
-
-
-
-## SDK Features that need Authentication
-
-
-
-
- | Feature |
- Reason |
-
-
-
-
-
-
- Courier Inbox
-
- |
-
- Needs Authentication to view inbox messages that belong to a user.
- |
-
-
-
-
- Push Notifications
-
- |
-
- Needs Authentication to sync push notification device tokens to the current user and Courier.
- |
-
-
-
-
- Preferences
-
- |
-
- Needs Authentication to read and write to user notification preferences.
- |
-
-
-
-
-
-
-# Usage
-
-Put this code where you normally manage your user's state. The user's access to [`Inbox`](https://github.com/trycourier/courier-flutter/blob/master/Docs/2_Inbox.md), [`Push Notifications`](https://github.com/trycourier/courier-flutter/blob/master/Docs/3_PushNotifications.md) and [`Preferences`](https://github.com/trycourier/courier-flutter/blob/master/Docs/4_Preferences.md) will automatically be managed by the SDK and stored in persistent storage. This means that if your user fully closes your app and starts it back up, they will still be "signed in".
-
-
-
-## 1. Generate a JWT
-
-To generate a JWT, you will need to:
-1. Create an endpoint on your backend
-2. Call this function inside that endpoint: [`Generate Auth Tokens`](https://www.courier.com/docs/reference/auth/issue-token/)
-3. Return the JWT
-
-Here is a curl example with all the scopes needed that the SDK uses. Change the scopes to the scopes you need for your use case.
-
-```curl
-curl --request POST \
- --url https://api.courier.com/auth/issue-token \
- --header 'Accept: application/json' \
- --header 'Authorization: Bearer $YOUR_AUTH_KEY' \
- --header 'Content-Type: application/json' \
- --data
- '{
- "scope": "user_id:$YOUR_USER_ID write:user-tokens inbox:read:messages inbox:write:events read:preferences write:preferences read:brands",
- "expires_in": "$YOUR_NUMBER days"
- }'
-```
-
-## 2. Get a JWT in your app
-
-```dart
-final userId = "your_user_id";
-final jwt = await YourBackend.generateCourierJWT(userId);
-```
-
-## 3. Sign your user in
-
-Signed in users will stay signed in between app sessions.
-
-```dart
-final userId = "your_user_id";
-await Courier.shared.signIn(userId: userId, accessToken: jwt);
-```
-
-If the token is expired, you can generate a new one from your endpoint and call `Courier.shared.signIn(...)` again. You will need to check the token manually for expiration or generate a new one when the user views a specific screen in your app. It is up to you to handle token expiration and refresh based on your security needs.
-
-## 4. Sign your user out
-
-This will remove any credentials that are stored between app sessions.
-
-```dart
-await Courier.shared.signOut();
-```
-
-## All Available Authentication Values
-
-```dart
-final userId = await Courier.shared.userId;
-final tenantId = await Courier.shared.tenantId;
-final isUserSignedIn = await Courier.shared.isUserSignedIn;
-
-final listener = await Courier.shared.addAuthenticationListener { userId in
- print(userId ?? "No userId found")
-}
-
-await listener.remove();
-```
diff --git a/Docs/2_Inbox.md b/Docs/2_Inbox.md
deleted file mode 100644
index 0b5bf65..0000000
--- a/Docs/2_Inbox.md
+++ /dev/null
@@ -1,423 +0,0 @@
-
-
-> **Note**: These docs have moved to [courier.com/docs/sdk-libraries/flutter](https://www.courier.com/docs/sdk-libraries/flutter/). The content below may be outdated.
-
-
-
-# Courier Inbox
-
-An in-app notification center list you can use to notify your users. Allows you to build high quality, flexible notification feeds very quickly.
-
-## Requirements
-
-
-
-
-
-# JWT Authentication
-
-If you are using JWT authentication, be sure to enable JWT support on the Courier Inbox Provider [`here`](https://app.courier.com/integrations/catalog/courier).
-
-
-
-
-
-## Default Inbox Example
-
-The default `CourierInbox` styles.
-
-
-
-
-```swift
-CourierInbox(
- onMessageClick: (message, index) {
- message.isRead ? message.markAsUnread() : message.markAsRead();
- },
- onActionClick: (action, message, index) {
- print(action);
- },
-)
-```
-
-
-
-⚠️ Courier Flutter will automatically use your app's Theme unless you specifically apply a `CourierTheme`. Here are the values that will automatically be used by your Theme.
-
-- Button Style = `Theme.of(context).elevatedButtonTheme.style`
-- Loading Indicator Color = `Theme.of(context).primaryColor`
-- Unread Indicator Color = `Theme.of(context).primaryColor`
-- Title Style = `Theme.of(context).textTheme.titleMedium`
-- Body Style = `Theme.of(context).textTheme.bodyMedium`
-- Time Style = `Theme.of(context).textTheme.labelMedium`
-- Empty / Error State Text Style = `Theme.of(context).textTheme.titleMedium`
-- Empty / Error State Button Style = `Theme.of(context).elevatedButtonTheme.style`
-
-
-
-## Styled Inbox Example
-
-The styles you can use to quickly customize the `CourierInbox`.
-
-
-
-
-```dart
-final theme = CourierInboxTheme(
- unreadIndicatorStyle: const CourierInboxUnreadIndicatorStyle(
- indicator: CourierInboxUnreadIndicator.dot,
- color: Color(0xFF9747FF),
- ),
- loadingIndicatorColor: Color(0xFF9747FF),
- tabIndicatorColor: Color(0xFF9747FF),
- tabStyle: CourierInboxTabStyle(
- selected: CourierInboxTabItemStyle(
- font: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.bold,
- fontSize: 18,
- color: Color(0xFF9747FF),
- ),
- indicator: CourierInboxTabIndicatorStyle(
- color: Color(0xFF9747FF),
- font: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 16,
- color: Colors.white,
- ),
- ),
- ),
- unselected: CourierInboxTabItemStyle(
- font: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 18,
- color: Colors.black45,
- ),
- indicator: CourierInboxTabIndicatorStyle(
- color: Colors.black45,
- font: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 16,
- color: Colors.white,
- ),
- ),
- ),
- ),
- readingSwipeActionStyle: CourierInboxReadingSwipeActionStyle(
- read: const CourierInboxSwipeActionStyle(
- icon: Icons.drafts,
- color: Color(0xFF9747FF),
- ),
- unread: CourierInboxSwipeActionStyle(
- icon: Icons.mark_email_read,
- color: Color(0xFF9747FF).withOpacity(0.5),
- ),
- ),
- archivingSwipeActionStyle: const CourierInboxArchivingSwipeActionStyle(
- archive: CourierInboxSwipeActionStyle(
- icon: Icons.inbox,
- color: Colors.red,
- ),
- ),
- titleStyle: CourierInboxTextStyle(
- read: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 18,
- ),
- unread: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.bold,
- fontSize: 18,
- ),
- ),
- timeStyle: CourierInboxTextStyle(
- read: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 16,
- ),
- unread: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.bold,
- fontSize: 16,
- ),
- ),
- bodyStyle: CourierInboxTextStyle(
- read: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 16,
- ),
- unread: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.bold,
- fontSize: 16,
- ),
- ),
- buttonStyle: CourierInboxButtonStyle(
- read: FilledButton.styleFrom(
- backgroundColor: Colors.grey,
- foregroundColor: Colors.white,
- textStyle: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 16,
- ),
- ),
- unread: FilledButton.styleFrom(
- backgroundColor: Color(0xFF9747FF),
- foregroundColor: Colors.white,
- textStyle: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 16,
- ),
- ),
- ),
- separator: null,
-);
-
-// Pass the theme to the inbox
-// This example will use the same theme for light and dark mode
-CourierInbox(
- canSwipePages: true,
- lightTheme: theme,
- darkTheme: theme,
- scrollController: _customScrollController,
- onMessageClick: (message, index) {
- message.isRead ? message.markAsUnread() : message.markAsRead();
- },
- onActionClick: (action, message, index) {
- print(action);
- },
- onMessageLongPress: (message, index) {
- print(message);
- },
- onError: (error) {
- print(error);
- return 'Your custom error message';
- }
-)
-...
-```
-
-
-
-## Custom Inbox Example
-
-The raw data you can use to build whatever UI you'd like.
-
-
-
-```dart
-late CourierInboxListener _inboxListener;
-bool _isLoading = true;
-String? _error;
-List _messages = [];
-bool _canLoadMore = false;
-
-_inboxListener = await Courier.shared.addInboxListener(
- onLoading: (isRefresh) {
- setState(() {
- if (!isRefresh) _isLoading = true;
- _error = null;
- });
- },
- onError: (error) {
- setState(() {
- _isLoading = false;
- _error = error;
- });
- },
- onUnreadCountChanged: (unreadCount) {
- print('unreadCount: $unreadCount');
- },
- onTotalCountChanged: (feed, totalCount) {
- print('totalCount: $totalCount');
- },
- onMessagesChanged: (messages, canPaginate, feed) {
- if (feed == InboxFeed.feed) {
- setState(() {
- _messages = messages;
- _isLoading = false;
- _error = null;
- _canLoadMore = canPaginate;
- });
- }
- },
- onPageAdded: (messages, canPaginate, isFirstPage, feed) {
- if (feed == InboxFeed.feed && !isFirstPage) {
- setState(() {
- _messages = messages;
- _isLoading = false;
- _error = null;
- _canLoadMore = canPaginate;
- });
- }
- },
- onMessageEvent: (message, index, feed, event) {
- switch (event) {
- case InboxMessageEvent.added:
- setState(() {
- _messages.insert(index, message);
- });
- break;
- case InboxMessageEvent.read:
- setState(() {
- _messages[index] = message;
- });
- break;
- case InboxMessageEvent.unread:
- setState(() {
- _messages[index] = message;
- });
- break;
- case InboxMessageEvent.opened:
- setState(() {
- _messages[index] = message;
- });
- break;
- case InboxMessageEvent.archived:
- setState(() {
- _messages.removeAt(index);
- });
- break;
- case InboxMessageEvent.clicked:
- setState(() {
- _messages[index] = message;
- });
- break;
- }
- },
-);
-
-..
-
-@override
-Widget build(BuildContext context) {
- return Scaffold(
- body: ListView.separated(
- itemCount: _messages.length,
- itemBuilder: (BuildContext context, int index) {
- final message = _messages[index];
- return Text(message.messageId)
- },
- ),
- );
-}
-
-..
-
-@override
-void dispose() {
- _inboxListener.remove().catchError((error) {
- print('Failed to remove inbox listener: $error');
- });
- super.dispose();
-}
-```
-
-
-
-## Full Examples
-
-
-
-
-
-## Available Properties and Functions
-
-```dart
-// Pagination
-await Courier.shared.setInboxPaginationLimit(limit: 100);
-final messages = await Courier.shared.fetchNextInboxPage();
-
-// Currently fetched messages
-final messages = await Courier.shared.inboxMessages;
-
-// Pull to refresh
-await Courier.shared.refreshInbox();
-
-// Update a message
-await Courier.shared.openMessage(messageId: messageId);
-await Courier.shared.readMessage(messageId: messageId);
-await Courier.shared.unreadMessage(messageId: messageId);
-await Courier.shared.clickMessage(messageId: messageId);
-await Courier.shared.archiveMessage(messageId: messageId);
-await Courier.shared.readAllInboxMessages();
-
-// Update message shortcuts
-final message = InboxMessage(...);
-await message.markAsOpened();
-await message.markAsRead();
-await message.markAsUnread();
-await message.markAsClicked();
-await message.markAsArchived();
-
-// Listener
-final inboxListener = await Courier.shared.addInboxListener(
- onLoading: (isRefresh) {
-
- },
- onError: (error) {
-
- },
- onUnreadCountChanged: (unreadCount) {
-
- },
- onTotalCountChanged: (feed, totalCount) {
-
- },
- onMessagesChanged: (messages, canPaginate, feed) {
-
- },
- onPageAdded: (messages, canPaginate, isFirstPage, feed) {
-
- },
- onMessageEvent: (message, index, feed, event) {
-
- },
-);
-
-await inboxListener.remove();
-```
-
----
-
-👋 `Inbox APIs` can be found here
diff --git a/Docs/3_PushNotifications.md b/Docs/3_PushNotifications.md
deleted file mode 100644
index 23876e6..0000000
--- a/Docs/3_PushNotifications.md
+++ /dev/null
@@ -1,456 +0,0 @@
-
-
-> **Note**: These docs have moved to [courier.com/docs/sdk-libraries/flutter](https://www.courier.com/docs/sdk-libraries/flutter/). The content below may be outdated.
-
-
-
-# Push Notifications
-
-The easiest way to support push notifications in your app.
-
-## Features
-
-
-
-
- | Feature |
- Description |
- iOS |
- Android |
-
-
-
-
-
- Automatic Token Management
- |
-
- Push notification tokens automatically sync to the Courier studio.
- |
-
- ✅
- |
-
- ✅
- |
-
-
-
- Notification Tracking
- |
-
- Track if your users received or clicked your notifications even if your app is not runnning or open.
- |
-
- ✅
- |
-
- ✅
- |
-
-
-
- Permission Requests & Checking
- |
-
- Simple functions to request and check push notification permission settings.
- |
-
- ✅
- |
-
- ❌
- |
-
-
-
-
-
-
-## Requirements
-
-
-
-
- | Requirement |
- Reason |
-
-
-
-
-
-
- Authentication
-
- |
-
- Needs Authentication to sync push notification device tokens to the current user and Courier.
- |
-
-
-
-
- A Configured Provider
-
- |
-
- Courier needs to know who to route the push notifications to so your users can receive them.
- |
-
-
-
-
-
-
-
-
-
-
-# Manual Token Syncing
-
-If you want to manually sync tokens, you can do this here and skip the remaining parts of the setup guide. You will need this step if you want to use Firebase Cloud Messaging for iOS.
-
-```dart
-// Supported Courier providers
-await Courier.shared.setTokenForProvider(token: 'fcmToken', provider: CourierPushProvider.firebaseFcm);
-final fcmToken = await Courier.shared.getTokenForProvider(provider: CourierPushProvider.firebaseFcm);
-
-// Unsupported Courier providers
-await Courier.shared.setToken(token: 'token_value', provider: 'YOUR_PROVIDER');
-final token = await Courier.shared.getToken(provider: 'YOUR_PROVIDER');
-```
-
-
-
-# iOS Setup
-
-
-
-
- | Requirement |
- Reason |
-
-
-
-
-
-
- Apple Developer Membership
-
- |
-
- Apple requires all iOS developers to have a membership so you can manage your push notification certificates.
- |
-
-
- |
- A phyical iOS device
- |
-
- Although you can setup the Courier SDK without a device, a physical device is the only way to fully ensure push notification tokens and notification delivery is working correctly. Simulators are not reliable.
- |
-
-
-
-
-
-
-## **Automatically Sync Tokens (iOS)**
-
-https://user-images.githubusercontent.com/6370613/198094477-40f22b1e-b3ad-4029-9120-0eee22de02e0.mov
-
-1. Open your iOS project and increase the min SDK target to iOS 15.0+
-2. From your Flutter project's root directory, run: `cd ios && pod update`
-3. Change your `AppDelegate` to extend the `CourierFlutterDelegate` and add `import courier_flutter` to the top of your `AppDelegate` file
- - This automatically syncs APNS tokens to Courier
- - Allows the Flutter SDK to handle when push notifications are delivered and clicked
-4. Enable the "Push Notifications" capability
-
-### **2. Add the Notification Service Extension (Recommended)**
-
-To make sure Courier can track when a notification is delivered to the device, you need to add a Notification Service Extension. Here is how to add one.
-
-https://user-images.githubusercontent.com/29832989/214159327-01ef662f-094b-455c-9ae8-019c94121ba8.mov
-
-1. Download and Unzip the Courier Notification Service Extension: [`CourierNotificationServiceTemplate.zip`](https://github.com/trycourier/courier-notification-service-extension-template/archive/refs/heads/main.zip)
-2. Open the folder in terminal and run `sh make_template.sh`
- - This will create the Notification Service Extension on your mac to save you time
-3. Open your iOS app in Xcode and go to File > New > Target
-4. Search for "Courier Service" in the template selection screen and click "Next"
-5. Give the Notification Service Extension a name (i.e. "CourierService") and click "Finish"
-6. Click "Cancel" on the next popup
- - You do NOT need to click "Activate" here. Your Notification Service Extension will still work just fine.
-7. Select Service Extension (i.e. "CourierService"), select general, change deployment sdk to min SDK target to iOS 15.0+
-8. Open your `Podfile` and add the following snippet to the end of your Podfile
- - This will link the `Courier_iOS` pod to your Notification Service Extension
-
-```
-target 'CourierService' do
- use_frameworks!
- pod 'Courier_iOS'
-end
-```
-
-9. From the root of your Flutter app, run: `cd ios && pod install`
-10. In your project target, move the "Embedded Foundation Extensions" above "Run Scripts" and below "Link Binary With Libraries"
-
-
-
-
-
-# Android Setup
-
-
-
-
- | Requirement |
- Reason |
-
-
-
-
-
-
- Firebase Account
-
- |
-
- Needed to send push notifications out to your Android devices. Courier recommends you do this for the most ideal developer experience.
- |
-
-
- |
- A phyical Android device
- |
-
- Although you can setup the Courier SDK without a physical device, a physical device is the best way to fully ensure push notification tokens and notification delivery is working correctly. Simulators are not reliable.
- |
-
-
-
-
-## **Automatically Sync Tokens (Android)**
-
-https://user-images.githubusercontent.com/6370613/198111372-09a29aba-6507-4cf7-a59d-87e8df2ba492.mov
-
-1. Open Android project
-2. Add support for Jitpack to `android/build.gradle`
- - This is needed because the Courier Android SDK is hosted using Jitpack
- - Maven Central support will be coming later
-
-```gradle
-allprojects {
- repositories {
- google()
- mavenCentral()
- maven { url 'https://jitpack.io' } // Add this line
- }
-}
-```
-
-3. Add Firebase Messaging to your `app/build.gradle`
- - The Courier SDK no longer bundles Firebase — your app must add it explicitly
-
-```gradle
-plugins {
- // ...
- id "com.google.gms.google-services"
-}
-
-dependencies {
- implementation platform("com.google.firebase:firebase-bom:34.13.0")
- implementation "com.google.firebase:firebase-messaging"
-}
-```
-
-4. Add your `google-services.json` file to `android/app/`
- - Download this from the [Firebase Console](https://console.firebase.google.com/) for your project
-
-5. Update your `app/build.gradle` to support the min and compile SDKs
- - `minSdkVersion 24`
- - `compileSdkVersion 34`
-6. Run Gradle sync
-7. Change your `MainActivity` to extend the `CourierFlutterActivity` (or `CourierFlutterFragmentActivity` if you're using a `FragmentActivity`)
- - This allows Courier to handle when push notifications are delivered and clicked
-8. Setup a new Notification Service by creating a new file and pasting the code below in it
- - This allows you to present a notification to your user when a new notification arrives
-
-```kotlin
-import com.courier.android.Courier
-import com.courier.android.notifications.CourierPushNotificationIntent
-import com.courier.android.notifications.RemoteMessageExtensionsKt
-import com.google.firebase.messaging.FirebaseMessagingService
-import com.google.firebase.messaging.RemoteMessage
-
-class YourNotificationService : FirebaseMessagingService() {
-
- override fun onMessageReceived(message: RemoteMessage) {
- super.onMessageReceived(message)
-
- // Create the PendingIntent that runs when the user taps the notification
- // This intent targets your Activity and carries the original message payload
- // TODO: Remove this if you'd like. This is mostly useful for demo purposes.
- val notificationIntent = CourierPushNotificationIntent(
- context = this,
- target = MainActivity::class.java,
- payload = message
- )
-
- // Show the notification to the user.
- // Prefer data-only FCM so this service runs even in background/killed state.
- // Fall back to notification fields if data keys are missing.
- // TODO: Remove this if you'd like. This is mostly useful for demo purposes.
- notificationIntent.presentNotification(
- title = message.data["title"] ?: message.notification?.title,
- body = message.data["body"] ?: message.notification?.body,
- )
-
- // Notify the Courier SDK that a push was delivered
- Courier.onMessageReceived(message.data)
-
- }
-
- override fun onNewToken(token: String) {
- super.onNewToken(token)
-
- // Register/refresh this device's FCM token with Courier
- Courier.onNewToken(token)
- }
-
-}
-```
-
-9. Add the Notification Service entry in your `AndroidManifest.xml` file
-
-```xml
-
-
-
-
- ..
-
-
- // Add this 👇
-
-
-
-
-
- // Add this 👆
-
- ..
-
-
-
-```
-
-
-
-## **Support Notifications**
-
-```dart
-// Support the type of notifications you want to show on iOS
-Courier.setIOSForegroundPresentationOptions(options: [
- iOSNotificationPresentationOption.banner,
- iOSNotificationPresentationOption.sound,
- iOSNotificationPresentationOption.list,
- iOSNotificationPresentationOption.badge,
-]);
-
-// Request / Get Notification Permissions
-final currentPermissionStatus = await Courier.getNotificationPermissionStatus();
-final requestPermissionStatus = await Courier.requestNotificationPermission();
-
-// Handle push events
-final pushListener = await Courier.shared.addPushListener(
- onPushClicked: (push) {
- print(push);
- },
- onPushDelivered: (push) {
- print(push);
- },
-);
-
-// Remove the listener where makes sense to you
-// i.e. inside of dispose();
-pushListener.remove();
-```
-
-## **Send a Message**
-
-
-
----
-
-👋 `TokenManagement APIs` can be found here
diff --git a/Docs/4_Preferences.md b/Docs/4_Preferences.md
deleted file mode 100644
index 268e981..0000000
--- a/Docs/4_Preferences.md
+++ /dev/null
@@ -1,171 +0,0 @@
-
-
-> **Note**: These docs have moved to [courier.com/docs/sdk-libraries/flutter](https://www.courier.com/docs/sdk-libraries/flutter/). The content below may be outdated.
-
-# Courier Preferences
-
-Allow users to update which types of notifications they would like to receive.
-
-## Requirements
-
-
-
-
- | Requirement |
- Reason |
-
-
-
-
-
-
- Authentication
-
- |
-
- Needed to view preferences that belong to a user.
- |
-
-
-
-
-
-
-## Default Preferences View
-
-The default `CourierPreferences` styles.
-
-
-
-```swift
-import 'package:courier_flutter/ui/preferences/courier_preferences.dart';
-
-...
-
-@override
-Widget build(BuildContext context) {
- return CourierPreferences(
- mode: TopicMode(),
- );
-}
-```
-
-
-
-## Styled Preferences View
-
-The styles you can use to quickly customize the `CourierPreferences`.
-
-
-
-```swift
-import 'package:courier_flutter/courier_preference_channel.dart';
-import 'package:courier_flutter/ui/inbox/courier_inbox_theme.dart';
-import 'package:courier_flutter/ui/preferences/courier_preferences_theme.dart';
-import 'package:courier_flutter/ui/preferences/courier_preferences.dart';
-
-...
-
-final customTheme = CourierPreferencesTheme(
- brandId: "YOUR_BRAND_ID",
- topicSeparator: null,
- sectionTitleStyle: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.bold,
- fontSize: 20,
- color: Color(0xFF9747FF),
- ),
- topicTitleStyle: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 18,
- ),
- topicSubtitleStyle: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 16,
- ),
- topicTrailing: const Icon(
- Icons.edit_outlined,
- color: Colors.black45,
- ),
- sheetSeparator: null,
- sheetTitleStyle: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.bold,
- fontSize: 20,
- color: Color(0xFF9747FF),
- ),
- sheetSettingStyles: SheetSettingStyles(
- textStyle: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 18,
- ),
- activeTrackColor: Color(0xFF9747FF),
- activeThumbColor: Colors.white,
- inactiveTrackColor: Colors.black45,
- inactiveThumbColor: Colors.white,
- ),
- sheetShape: RoundedRectangleBorder(
- borderRadius: BorderRadius.vertical(
- top: Radius.circular(16.0),
- ),
- ),
- infoViewStyle: CourierInfoViewStyle(
- textStyle: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.bold,
- fontSize: 16,
- ),
- buttonStyle: FilledButton.styleFrom(
- backgroundColor: Colors.grey,
- foregroundColor: Colors.white,
- textStyle: GoogleFonts.sen().copyWith(
- fontWeight: FontWeight.normal,
- fontSize: 16,
- ),
- ),
- ),
-);
-
-...
-
-@override
-Widget build(BuildContext context) {
- return CourierPreferences(
- // keepAlive: true, // Useful if you are adding this widget to a TabBarView
- lightTheme: customTheme,
- darkTheme: customTheme,
- mode: ChannelsMode(channels: [CourierUserPreferencesChannel.push, CourierUserPreferencesChannel.sms, CourierUserPreferencesChannel.email]),
- onError: (error) => print(error),
- );
-}
-```
-
-
-
-### Courier Studio Branding (Optional)
-
-
-
-You can control your branding from the [`Courier Studio`](https://app.courier.com/designer/brands).
-
-
-
-
- | Supported Brand Styles |
- Support |
-
-
-
-
- Primary Color |
- ✅ |
-
-
- Show/Hide Courier Footer |
- ✅ |
-
-
-
-
----
-
-👋 `Branding APIs` can be found here
-
-👋 `Preference APIs` can be found here
diff --git a/Docs/5_Client.md b/Docs/5_Client.md
deleted file mode 100644
index 9665a7a..0000000
--- a/Docs/5_Client.md
+++ /dev/null
@@ -1,126 +0,0 @@
-> **Note**: These docs have moved to [courier.com/docs/sdk-libraries/flutter](https://www.courier.com/docs/sdk-libraries/flutter/). The content below may be outdated.
-
-# `CourierClient`
-
-Base layer Courier API wrapper.
-
-## Initialization
-
-Creating a client stores request authentication credentials only for that specific client. You can create as many clients as you'd like. See the "Going to Production" section here for more info.
-
-```dart
-// Creating a client
-final client = CourierClient(
- jwt: 'jwt', // Optional. Likely needed for your use case. See above for more authentication details
- clientKey: 'client_key', // Optional. Used only for Inbox
- userId: 'user_id',
- connectionId: 'connection_id', // Optional. Used for inbox websocket
- tenantId: 'tenant_id', // Optional. Used for scoping a client to a specific tenant
- showLogs: true, // Optional. Defaults to your current kDebugMode
-);
-
-// Details about the client
-final options = client.options
-```
-
-## Token Management APIs
-
-All available APIs for Token Management
-
-```dart
-// Saves a token into Courier Token Management
-final device = CourierDevice(
- appId: 'example', // Optional
- adId: 'example', // Optional
- deviceId: 'example', // Optional
- platform: 'example', // Optional
- manufacturer: 'example', // Optional
- model: 'example', // Optional
-);
-
-await client.tokens.putUserToken(
- token: 'example_token',
- provider: 'firebase-fcm',
- device: device, // Optional
-);
-
-// Deletes the token from Courier Token Management
-await client.tokens.deleteUserToken(
- token: 'token'
-);
-```
-
-## Inbox APIs
-
-All available APIs for Inbox
-
-```dart
-// Get all inbox messages
-// Includes the total count in the response
-final res = await client.inbox.getMessages(
- paginationLimit: 123, // Optional
- startCursor: null, // Optional
-);
-
-// Returns only archived messages
-// Includes the total count of archived message in the response
-final res = await client.inbox.getArchivedMessages(
- paginationLimit: 123, // Optional
- startCursor: null, // Optional
-);
-
-// Gets the number of unread messages
-final count = await client.inbox.getUnreadMessageCount();
-
-// Tracking messages
-await client.inbox.open(messageId: messageId);
-await client.inbox.click(messageId: messageId, trackingId: "example_id");
-await client.inbox.read(messageId: messageId);
-await client.inbox.unread(messageId: messageId);
-await client.inbox.archive(messageId: messageId);
-await client.inbox.readAll();
-```
-
-## Preferences APIs
-
-All available APIs for Preferences
-
-```dart
-// Get all the available preference topics
-final res = await client.preferences.getUserPreferences(
- paginationCursor: null // Optional
-);
-
-// Gets a specific preference topic
-final res = await client.preferences.getUserPreferenceTopic(
- topicId: topicId
-);
-
-// Updates a user preference topic
-await client.preferences.putUserPreferenceTopic(
- topicId: topicId,
- status: CourierUserPreferencesStatus.optedIn,
- hasCustomRouting: true,
- customRouting: [CourierUserPreferencesChannel.push],
-);
-```
-
-## Branding APIs
-
-All available APIs for Branding
-
-```dart
-final res = await client.brands.getBrand(brandId: brandId);
-```
-
-## URL Tracking APIs
-
-All available APIs for URL Tracking
-
-```dart
-// Pass a trackingUrl, usually found inside of a push notification payload or Inbox message
-await client.tracking.postTrackingUrl(
- url: trackingUrl,
- event: CourierTrackingEvent.delivered,
-);
-```
diff --git a/README.md b/README.md
index 005daa5..07b8a62 100644
--- a/README.md
+++ b/README.md
@@ -1,159 +1,43 @@
-
# 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.
+Requires iOS 15.0+, Android SDK 23+, and Gradle 8.4+.
+
## Installation
```bash
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.
+After adding the package, run `cd ios && pod install`.
## Quick Start
```dart
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)
+// Sign in (JWT generated by your backend)
await Courier.shared.signIn(
userId: "user_123",
accessToken: jwt,
);
-// Add a prebuilt Inbox widget
+// Drop in a prebuilt Inbox widget
CourierInbox(
- onMessageClick: (message, index) {
+ onMessageClick: (message, _) {
message.isRead ? message.markAsUnread() : message.markAsRead();
},
)
-
-// Add a prebuilt Preferences widget
-CourierPreferences(mode: TopicMode())
```
## Documentation
-Full documentation: **[courier.com/docs/sdk-libraries/flutter](https://www.courier.com/docs/sdk-libraries/flutter/)**
-
-- [Inbox Overview](https://www.courier.com/docs/platform/inbox/inbox-overview/)
-- [Authentication](https://www.courier.com/docs/platform/inbox/authentication/)
-- [Push Integrations](https://www.courier.com/docs/external-integrations/push/intro-to-push/)
-
-
-
-
-# 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
-
-
-
-
-
-# **Share feedback with Courier**
+Full documentation lives at **[courier.com/docs/sdk-libraries/flutter](https://www.courier.com/docs/sdk-libraries/flutter)** — installation, authentication, push setup (iOS `CourierFlutterDelegate` + Android Firebase decoupling), theming, custom UI, and the `CourierClient` API reference.
-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:
+## Feedback
-[Courier Flutter Issues](https://github.com/trycourier/courier-flutter/issues)
+Found a bug or want to request a feature? [Open an issue](https://github.com/trycourier/courier-flutter/issues).