FlutterBranchSdk class


Constructs a singleton instance of FlutterBranchSdk.


hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
Returns a string representation of this object.


operator ==(dynamic other) bool
The equality operator. [...]

Static Methods

disableTracking(bool value) → void
Method to change the Tracking state. If disabled SDK will not track any user data or state. SDK will not send any network calls except for deep linking when tracking is disabled
getCreditHistory({String bucket}) Future<BranchResponse>
Gets the credit history
getFirstReferringParams() Future<Map>
Returns the first parameters associated with the link that referred the user
getLatestReferringParams() Future<Map>
Returns the last parameters associated with the link that referred the user
getShortUrl({BranchUniversalObject buo, BranchLinkProperties linkProperties}) Future<BranchResponse>
Creates a short url for the BUO
initSession() Stream<Map>
Initialises a session with the Branch API Listen click em Branch Deeplinks
isUserIdentified() Future<bool>
Indicates whether or not this user has a custom identity specified for them. Note that this is independent of installs. If you call setIdentity, this device will have that identity associated with this user until logout is called. This includes persisting through uninstalls, as we track device id.
listOnSearch({BranchUniversalObject buo, BranchLinkProperties linkProperties}) Future<bool>
For Android: Publish this BUO with Google app indexing so that the contents will be available with google search For iOS: List items on Spotlight
loadRewards({String bucket}) Future<BranchResponse>
Retrieves rewards for the current user/session
logout() → void
This method should be called if you know that a different person is about to use the app
redeemRewards({int count, String bucket}) Future<BranchResponse>
Redeems the specified number of credits. if there are sufficient credits within it. If the number to redeem exceeds the number available in the bucket, all of the available credits will be redeemed instead.
registerView({BranchUniversalObject buo}) → void
Mark the content referred by this object as viewed. This increment the view count of the contents referred by this object.
removeFromSearch({BranchUniversalObject buo, BranchLinkProperties linkProperties}) Future<bool>
For Android: Remove the BUO from the local indexing if it is added to the local indexing already This will remove the content from Google(Firebase) and other supported Indexing services For iOS: Remove Branch Universal Object from Spotlight if privately indexed
setIdentity(String userId) → void
Identifies the current user to the Branch API by supplying a unique identifier as a userId value
showShareSheet({BranchUniversalObject buo, BranchLinkProperties linkProperties, String messageText, String androidMessageTitle: '', String androidSharingTitle: ''}) Future<BranchResponse>
Showing a Share Sheet
trackContent({BranchUniversalObject buo, BranchEvent branchEvent}) → void
Logs this BranchEvent to Branch for tracking and analytics
trackContentWithoutBuo({BranchEvent branchEvent}) → void
Logs this BranchEvent to Branch for tracking and analytics
validateSDKIntegration() → void
Use the SDK integration validator to check that you've added the Branch SDK and handle deep links correctly when you first integrate Branch into your app.