Skip to content

About the Braze Flutter SDK

The Braze Flutter SDK helps you integrate Braze messaging, analytics, and user engagement capabilities into your application.

To get started, refer to the following resources:

Quickstart

1
flutter pub add braze_plugin

Android

1
2
3
4
5
6
<!-- android/res/values/braze.xml -->
<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string translatable="false" name="com_braze_api_key">YOUR_APP_IDENTIFIER_API_KEY</string>
  <string translatable="false" name="com_braze_custom_endpoint">YOUR_CUSTOM_ENDPOINT_OR_CLUSTER</string>
</resources>
1
2
3
<!-- AndroidManifest.xml -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

iOS

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// AppDelegate.swift
import BrazeKit
import braze_plugin

class AppDelegate: UIResponder, UIApplicationDelegate {
  static var braze: Braze? = nil

  func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil
  ) -> Bool {
    // Setup Braze
    let configuration = Braze.Configuration(
      apiKey: "<BRAZE_API_KEY>",
      endpoint: "<BRAZE_ENDPOINT>"
    )
    // - Enable logging or customize configuration here
    configuration.logger.level = .info
    let braze = BrazePlugin.initBraze(configuration)
    AppDelegate.braze = braze

    return true
  }
}

Dart

1
2
3
4
5
6
7
import 'package:braze_plugin/braze_plugin.dart';

// ...
_braze = new BrazePlugin();

// ...
_braze.changeUser("Jane Doe");

See the Braze Developer Guide for advanced integration options.

Version Support

Tool Minimum Supported Version
Dart 2.17.0+
Flutter (integration via CocoaPods) 1.10.0+
Flutter (integration via CocoaPods or Swift Package Manager) 3.24.0+
iOS Deployment Target 12.0+

This SDK additionally inherits the requirements of its underlying Braze native SDKs. Be sure to also adhere to version support information defined in braze-inc/braze-android-sdk and braze-inc/braze-swift-sdk

Sample App

The /example folder contains a sample app illustrating how to integrate and use this package’s APIs.

Contact

If you have questions, please contact [email protected].

For repository details and sample projects, see https://github.com/braze-inc/braze-flutter-sdk.

New Stuff!