FlutterBranchSdk class

Constructors

FlutterBranchSdk()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

addFacebookPartnerParameter({required String key, required String value}) → void
Add a Partner Parameter for Facebook. Once set, this parameter is attached to installs, opens and events until cleared or the app restarts. See Facebook's documentation for details on valid parameters
addSnapPartnerParameter({required String key, required String value}) → void
Add a Partner Parameter for Snap. Once set, this parameter is attached to installs, opens and events until cleared or the app restarts.
clearPartnerParameters() → void
Clears all Partner Parameters
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
getAdvertisingIdentifier() Future<String>
return advertising identifier (ie tracking data). on Android returns empty string
getFirstReferringParams() Future<Map>
Returns the first parameters associated with the link that referred the user
getLastAttributedTouchData({int? attributionWindow}) Future<BranchResponse>
Gets the available last attributed touch data with a custom set attribution window.
getLatestReferringParams() Future<Map>
Returns the last parameters associated with the link that referred the user
getQRCodeAsData({required BranchUniversalObject buo, required BranchLinkProperties linkProperties, required BranchQrCode qrCode}) Future<BranchResponse>
Creates a Branch QR Code image. Returns the QR code as Uint8List.
getQRCodeAsImage({required BranchUniversalObject buo, required BranchLinkProperties linkProperties, required BranchQrCode qrCode}) Future<BranchResponse>
Creates a Branch QR Code image. Returns the QR code as a Image.
getShortUrl({required BranchUniversalObject buo, required BranchLinkProperties linkProperties}) Future<BranchResponse>
Creates a short url for the BUO
getTrackingAuthorizationStatus() Future<AppTrackingStatus>
return AppTrackingStatus on Android returns notSupported
Have Branch end the current deep link session and start a new session with the provided URL.
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({required 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
logout() → void
This method should be called if you know that a different person is about to use the app
registerView({required 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({required 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
requestTrackingAuthorization() Future<AppTrackingStatus>
request AppTracking Autorization and return AppTrackingStatus on Android returns notSupported
setConnectTimeout(int connectTimeout) → void
Sets the duration in milliseconds that the system should wait for initializing a network * request.
setIdentity(String userId) → void
Identifies the current user to the Branch API by supplying a unique identifier as a userId value
setIOSSKAdNetworkMaxTime(int hours) → void
Set time window for SKAdNetwork callouts in Hours (Only iOS) By default, Branch limits calls to SKAdNetwork to within 72 hours after first install.
setPreinstallCampaign(String value) → void
Add the pre-install campaign analytics
setPreinstallPartner(String value) → void
Add the pre-install campaign analytics
setRequestMetadata(String key, String value) → void
Add key value pairs to all requests
setRetryCount(int retryCount) → void
Sets the max number of times to re-attempt a timed-out request to the Branch API, before considering the request to have failed entirely. Default to 3. Note that the the network timeout, as set in setNetworkTimeout(int), together with the retry interval value from setRetryInterval(int) will determine if the max retry count will be attempted.
setRetryInterval(int retryInterval) → void
Sets the amount of time in milliseconds to wait before re-attempting a timed-out request to the Branch API. Default 1000 ms.
setTimeout(int timeout) → void
Sets the duration in milliseconds that the system should wait for a response before timing out any Branch API. Default 5500 ms. Note that this is the total time allocated for all request retries as set in setRetryCount(int).
shareWithLPLinkMetadata({required BranchUniversalObject buo, required BranchLinkProperties linkProperties, required Uint8List icon, required String title}) → void
Share with LPLinkMetadata on iOS
showShareSheet({required BranchUniversalObject buo, required BranchLinkProperties linkProperties, required String messageText, String androidMessageTitle = '', String androidSharingTitle = ''}) Future<BranchResponse>
Showing a Share Sheet
trackContent({required List<BranchUniversalObject> buo, required BranchEvent branchEvent}) → void
Logs this BranchEvent to Branch for tracking and analytics
trackContentWithoutBuo({required 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.