TBLSdkPlugin class

This class is the Dart part of a 2-way bridge to native Android & iOS code.

The mirroring part is:

  • In Android /taboola_sdk/android/src.main/java.com.taboola.flutter/TaboolaSdkPlugin.java -- Editing this plugin is best done when editing /taboola_sdk/android/ in AndroidStudio and enabling a Gradle dependency on the Flutter.jar placed in libs. -- Add your new method to the onMethodCall() filter function -- After you finish editing in Android Studio, disable the Gradle dependency of Flutter.jar

  • In iOS /taboola_sdk/ios/Classes/SwiftTaboolaSdkPlugin.swift -- Add your new method to the handle() filter function

Source: https://flutter.dev/docs/development/platform-integration/platform-channels

Inheritance

Constructors

TBLSdkPlugin()

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

androidInfo() Future<TBLAndroidDevice>
override
getAllPackageInfo() Future<TBLPackageInfoData>
override
iosInfo() Future<TBLIosDevice>
override
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

getAdIdOrIdfa() Future<String>
By definition, Android plugin will always return advId, iOS plugin will return an empty String if user has opted out.
getIsoCountryCode() Future<String>
getTrackingStatus() Future<TBLTrackingStatus>
This method retrieves the tracking status. It is a static method that returns a Future containing the TrackingStatus enum. If the platform is iOS, it invokes a native method to get the tracking status If the platform is not iOS, it returns TrackingStatus.denied this logic came fro align Flutter SDK to iOS native. iOS native enum values are: notDetermined, restricted, denied, authorized since Flutter SDK is aligned to iOS native, we are using the same enum values that are passed to ML. Returns TrackingStatus representing the current tracking status.
isUserOptOut() Future<bool>
sendExceptionToGUEH(String stacktrace, String errorMessage, {String? errorReason}) Future<void>
setPluginVersion() Future<void>