Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #256 from Harshit933/sqlite_fix
Browse files Browse the repository at this point in the history
fix(core) : added the sqlite dependency.
  • Loading branch information
ricardobrg authored May 1, 2023
2 parents ecad4ee + 1441d8d commit 3b47648
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 20 deletions.
58 changes: 58 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"commitConvention": "angular",
"contributors": [
{
"login": "ricardobrg",
"name": "Ricardo Gonçalves",
"avatar_url": "https://avatars.githubusercontent.com/u/8357343?v=4",
"contributions": [
"profile": "https://www.linkedin.com/in/ricardolg/",
"doc",
"code",
"example",
"test"
]
"maintenance",
},
{
"login": "mike-audi",
"name": "Mike Audi",
"avatar_url": "https://avatars.githubusercontent.com/u/3769672?v=4",
"profile": "http://mytiki.com",
"contributions": [
"code",
"review"
]
},
}
"login": "Harshit933",
"name": "Harshit",
"avatar_url": "https://avatars.githubusercontent.com/u/90508384?v=4",
"profile": "http://harshit933.github.io",
"contributions": [
"code",
"test"
]
},
{
"login": "Vigneshsanath",
"name": "Vigneshsanath",
"avatar_url": "https://avatars.githubusercontent.com/u/117610954?v=4",
"profile": "https://github.com/Vigneshsanath",
"contributions": [
"design"
]
}
],
"contributorsPerLine": 7,
"skipCi": true,
"repoType": "github",
"repoHost": "https://github.com",
"projectName": "tiki-sdk-flutter",
"projectOwner": "tiki"
}
133 changes: 114 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,123 @@
### [🍍 Console](https://console.mytiki.com)    [📚 Docs](https://docs.mytiki.com)
# TIKI SDK (Flutter) —Data Licensing
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

# TIKI SDK Flutter —build the new data economy
The TIKI SDK for JavaScript makes it easy to add data licensing to your web 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](https://mytiki.com/reference/getting-started).

A package for adding TIKI's decentralized infrastructure to **Flutter** projects. Add tokenized data
ownership, consent, and rewards to your app in minutes.
This library includes both configurable pre-built UI flows/elements and native low-level APIs for building custom experiences.

For native iOS and Android projects, use:
**Get started with our 📚 [SDK docs](https://mytiki.com/docs/sdk-overview), or jump right into the 📘 [API reference](https://pub.dev/packages/tiki_sdk_flutter).**

- **🤖 Android: [tiki-sdk-android](https://github.com/tiki/tiki-sdk-android)**
- **🍎 iOS: [tiki-sdk-ios](https://github.com/tiki/tiki-sdk-ios)**
## Installing

### [🎬 How to get started](https://docs.mytiki.com/docs/tiki-sdk-flutter-getting-started)
_Note: Before you get started, you will need a Publishing ID. It's free to create one; simply log in to our 🧑‍💻 [Developer Console](https://console.mytiki.com) and create a new Project._

- **[API Reference ➝](https://docs.mytiki.com/reference/tiki-sdk-flutter-tiki-sdk-flutter-builder)**
- **[Dart Docs ➝](https://pub.dev/documentation/tiki_sdk_flutter/latest/)**
Install the dependency using Flutter

#### Basic Architecture
```
flutter pub add tiki_sdk_flutter
```

The package builds on TIKI's core SDK
implementation (**[tiki-sdk-dart](https://github.com/tiki/tiki-sdk-dart)**) adding the following
platform-specific configurations:
This will add a line like this to your package's `pubspec.yaml` (and run an implicit `flutter pub get`):

- A KeyStorage (`tiki_sdk_flutter_key_storage.dart`) implementation
using [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage)
- Native dependencies for SQLite ([sqlite3](https://pub.dev/packages/sqlite3)
& [sqlite3_flutter_libs](https://pub.dev/packages/sqlite3_flutter_libs))
- Default storage directory using [path_provider](https://pub.dev/packages/path_provider)
```
dependencies:
tiki_sdk_flutter: ^2.1.6
```

Make sure your project's Android `minSdkVersion` to is set to at least `19` in `[project]/android/app/build.gradle`.

```Text Gradle
android {
...
defaultConfig {
...
minSdkVersion 19
...
}
}
```

That's it. And yes, it's really that easy.

## Initialization
Initialize the TIKI SDK in minutes with the TIKI pre-built UI and a custom data offer —just 1 builder function.

```
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>");
```

Read about styling, selecting metadata, and desiging your offer in our [📚 SDK docs →](https://mytiki.com/docs/sdk-overview).

## UI Flows

The SDK includes 2 pre-built flows: `present()` and `settings()`. Use `present()` to display to the user a new data licensing offer.

```
TikiSdk.present(context);
```

Use `settings()` to render a ...settings screen 😲 where users can change their mind and opt-out of an existing license agreement.

```
TikiSdk.settings(context);
```
# Contributing

- Use [GitHub Issues](https://github.com/tiki/tiki-sdk-flutter/issues) to report any bugs you find or to request enhancements.
- If you'd like to get in touch with our team or other active contributors, pop in our 👾 [Discord](https://discord.gg/tiki).
- Please use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) if you intend to add code to this project.

## Project Structure
__

- `/lib`: The primary implementation source for the library.
- `/ui`: Declarative UI flows and widgets.
- `/assets`: Bundled assets such as graphics and fonts.
- `/integration_tests`: Requires a device or simulator.
- `/example_app`: Simple example app showing how to get started configuring and adding the SDK to a basic Flutter app.

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/ricardolg/"><img src="https://avatars.githubusercontent.com/u/8357343?v=4?s=100" width="100px;" alt="Ricardo Gonçalves"/><br /><sub><b>Ricardo Gonçalves</b></sub></a><br /><a href="https://github.com/tiki/tiki-sdk-flutter/commits?author=ricardobrg" title="Code">💻</a> <a href="https://github.com/tiki/tiki-sdk-flutter/commits?author=ricardobrg" title="Documentation">📖</a> <a href="#example-ricardobrg" title="Examples">💡</a> <a href="#maintenance-ricardobrg" title="Maintenance">🚧</a> <a href="https://github.com/tiki/tiki-sdk-flutter/commits?author=ricardobrg" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://mytiki.com"><img src="https://avatars.githubusercontent.com/u/3769672?v=4?s=100" width="100px;" alt="Mike Audi"/><br /><sub><b>Mike Audi</b></sub></a><br /><a href="https://github.com/tiki/tiki-sdk-flutter/commits?author=mike-audi" title="Code">💻</a> <a href="https://github.com/tiki/tiki-sdk-flutter/pulls?q=is%3Apr+reviewed-by%3Amike-audi" title="Reviewed Pull Requests">👀</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://harshit933.github.io"><img src="https://avatars.githubusercontent.com/u/90508384?v=4?s=100" width="100px;" alt="Harshit"/><br /><sub><b>Harshit</b></sub></a><br /><a href="https://github.com/tiki/tiki-sdk-flutter/commits?author=Harshit933" title="Code">💻</a> <a href="https://github.com/tiki/tiki-sdk-flutter/commits?author=Harshit933" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Vigneshsanath"><img src="https://avatars.githubusercontent.com/u/117610954?v=4?s=100" width="100px;" alt="Vigneshsanath"/><br /><sub><b>Vigneshsanath</b></sub></a><br /><a href="#design-Vigneshsanath" title="Design">🎨</a></td>
</tr>
</tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
10 changes: 9 additions & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.11.0"
sqlite3_flutter_libs:
dependency: transitive
description:
name: sqlite3_flutter_libs
sha256: "02f80aea54a19a36b347dedf6d4181ecd9107f5831ea6139cfd0376a3de197ba"
url: "https://pub.dev"
source: hosted
version: "0.5.13"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -675,7 +683,7 @@ packages:
path: ".."
relative: true
source: path
version: "2.1.5"
version: "2.1.6"
typed_data:
dependency: transitive
description:
Expand Down
8 changes: 8 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.11.0"
sqlite3_flutter_libs:
dependency: "direct main"
description:
name: sqlite3_flutter_libs
sha256: "02f80aea54a19a36b347dedf6d4181ecd9107f5831ea6139cfd0376a3de197ba"
url: "https://pub.dev"
source: hosted
version: "0.5.13"
stack_trace:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ dependencies:
tiki_sdk_dart: ^2.1.4
permission_handler: ^10.2.0
package_info_plus: ^3.1.0
sqlite3_flutter_libs: ^0.5.13

dev_dependencies:
integration_test:
Expand Down

0 comments on commit 3b47648

Please sign in to comment.