tiki_sdk_flutter 2.1.7 copy "tiki_sdk_flutter: ^2.1.7" to clipboard
tiki_sdk_flutter: ^2.1.7 copied to clipboard

A package for adding TIKI's decentralized infrastructure to Flutter projects. Add tokenized data ownership, consent, and rewards to your app in minutes.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:tiki_sdk_flutter/tiki_sdk.dart';

const String origin = "com.mytiki.tiki_sdk_example";
const String publishingId = "e12f5b7b-6b48-4503-8b39-28e4995b5f88";

void main() async {
  await TikiSdk.config()
      .theme
        .fontFamily("SpaceGrotesk")
        .and()
      .offer
        .reward(Image.asset("lib/ui/assets/images/offer_sample.png"))
        .ptr("test_offer")
        .bullet("Learn how our ads perform ", true)
        .bullet("Reach you on other platforms", false)
        .bullet("Sold to other companies", false)
        .use([LicenseUsecase.support()])
        .tag(TitleTag.advertisingData())
        .description("Trade your IDFA (kind of like a serial # for your phone) for a discount.")
        .terms("lib/ui/assets/terms.md")
        .permission(Permission.camera)
        .duration(const Duration(days: 365))
        .add()
      .initialize(publishingId, "test_user_123", onComplete: () =>
    runApp(const MyApp())
  );
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
        title: 'TIKI SDK Example App',
        home: Scaffold(body: Center(child: ExampleButtons())));
  }
}

class ExampleButtons extends StatelessWidget{
  const ExampleButtons({super.key});

  @override
  Widget build(BuildContext context) =>  Column(
    mainAxisSize: MainAxisSize.min,
    crossAxisAlignment: CrossAxisAlignment.center,
    children: [
      ElevatedButton(onPressed:
          () => TikiSdk.present(context), child: const Text("Start")),
      ElevatedButton(onPressed:
          () => TikiSdk.settings(context), child: const Text("Settings"))
    ],
  );
}
0
likes
135
points
135
downloads

Publisher

verified publishermytiki.com

Weekly Downloads

A package for adding TIKI's decentralized infrastructure to Flutter projects. Add tokenized data ownership, consent, and rewards to your app in minutes.

Homepage
Repository (GitHub)
View/report issues

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

app_settings, flutter, flutter_markdown, flutter_secure_storage, package_info_plus, path_provider, permission_handler, sqlite3, sqlite3_flutter_libs, tiki_sdk_dart, uuid

More

Packages that depend on tiki_sdk_flutter