Flutter v2.1.6
The TIKI SDK for Flutter makes it easy to add consumer data licensing to your Flutter applications. It's the client-side component that your users will interact with to accept (or decline) data licensing offers. TIKI's SDK creates immutable, digitally signed license records using cryptographic hashing, forming an audit trail. Programmatically consume records and enforce terms client or server-side using developer-friendly data structures and APIs.
This library includes both configurable pre-built UI flows/elements and native low-level APIs for building custom experiences.
Get started with our 📚 SDK docs, or jump right into the 📘 API reference.
Get Started
Install the dependency using Flutter
flutter pub add tiki_sdk_flutter
Make sure your project's Android minSdkVersion
to is set to at least 19
in [project]/android/app/build.gradle
.
android {
...
defaultConfig {
...
minSdkVersion 19
...
}
}
Now just initialize the Pre-built UI and configure your offer.
await TikiSdk.config()
.theme
.primaryTextColor(Color(0xFF1C0000))
.primaryBackgroundColor(Color(0xFFFFFFFF))
.secondaryBackgroundColor(Color(0xFFF6F6F6))
.accentColor(Color(0xFF00B277))
.fontFamily("Space Grotesk")
.and()
.offer
.description("Trade your IDFA (kind of like a serial # for your phone) for a discount.")
.reward(Image.asset("<path>/reward.png"))
.bullet("Learn how our ads perform", true)
.bullet("Reach you on other platforms", false)
.bullet("Sold to other companies", false)
.terms("<path>/terms.md")
.ptr("db2fd320-aed0-498e-af19-0be1d9630c63")
.tag(TitleTag.deviceId())
.use([LicenseUsecase.attribution()])
.add()
.initialize("<your-publishing-id>", "<your-user-id>");
That's it 🥳.
Use TikiSdk.present()
in your app to kick off the offer flow.
Source: github.com/tiki/tiki-sdk-flutter