Build codecov pub package License: MIT


This plugin is a wrapper for the Branch SDK.


  • Basic Integration.
  • Install Attribution.

Note: This plugin is still in alpha and provides little interfacing with the Branch SDK at the moment. Rest assured, the plugin is still being actively developed. Provided interfaces/features are production ready.

Getting started

Add the below to your pubspec.yaml file.

  branch_sdk: ^1.0.0-alpha.6

and run flutter pub get

For iOS you need to go further in to your ios folder and run pod install. You need to install cocoapods for that.

and import with

import 'package:branch_sdk/branch_sdk.dart';


Basic Integration

To basically setup the Branch SDK you need to follow the below instructions based on platform of choice.

iOS Setup

As described in the official docs here, Add the below to your Info.plist file

<!-- App Key -->
<!-- Register a URI Scheme -->

You can obtain the live or test keys from your DashBoard. If you want to set the test and prod keys at the same time, you can add this instead in your Info.plist file for the branch_key value.


To support Universal Links, follow the instructions here

Android Setup

Add the below to your AndroidManifest.xml file just within the <application> tag.

<meta-data android:name="io.branch.sdk.BranchKey" android:value="key_live_abc" />
<meta-data android:name="io.branch.sdk.BranchKey.test" android:value="key_test_abc" />
<!-- Set to use Live or Test Key -->
<meta-data android:name="io.branch.sdk.TestMode" android:value="true" />


To initialize Branch do the following:

import 'package:branch_sdk/branch_sdk.dart';

BranchSdk.init(debug: true); // Set debug to true to use test key and enable logging. Note io.branch.sdk.TestMode in AndroidManifest.xml must be set to true for debug:true to work.

To guarantee the success of this function, ensure you've called the below in the app's main function


To verify your integration, do the following:

import 'package:branch_sdk/branch_sdk.dart';

BranchSdk.init(debug: true);

BranchSdk.validateSDKIntegration(); // Remember to remove this in production.

Additional information

For a practical example, see the package example section.


Pull requests are welcome.