notik_offerwall 1.3.0 copy "notik_offerwall: ^1.3.0" to clipboard
notik_offerwall: ^1.3.0 copied to clipboard

Flutter SDK for the Notik Offerwall. Provides native offer listing, search, sort, categories, offer details, WebView-based offer flow, and postback tracking.

Notik Offerwall SDK for Flutter #

A fully native Flutter SDK for integrating the Notik Offerwall into your app. Users complete offers (installs, surveys, games, tasks) and earn rewards.

Unlike wrapper SDKs that embed a black-box native view, this SDK provides a fully customizable Flutter UI with native platform channels for deep hardware info collection.

Features #

  • Native offerwall UI with search, category filter, sort, and infinite scroll
  • Offer detail screen with multi-step missions and platform tags
  • WebView-based offer redemption flow
  • Postback/conversion tracking with polling and listener callbacks
  • token authentication and GAID/IDFA
  • standard device id, and adv id for user fraud control
  • Full theming support (light, dark, custom)
  • Auto token refresh and 401 retry
  • hasOffers() pre-check for conditional UI display
  • Server-side rate limiting per device and per IP

Installation #

Add to your pubspec.yaml:

dependencies:
  notik_offerwall: ^1.1.0

Then run:

flutter pub get

Android #

Minimum SDK 21. Add internet permission (usually already present):

<uses-permission android:name="android.permission.INTERNET"/>

iOS #

Minimum iOS 13.0. Add to your Info.plist for ad tracking (IDFA):

<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to show you relevant offers.</string>

Quick Start #

import 'package:notik_offerwall/notik_offerwall.dart';

// Initialize and show on button tap (lazy init)
onTap: () async {
  if (!NotikOfferwall.isInitialized) {
    try {
      await NotikOfferwall.init(NotikConfig(
        apiKey: 'your_api_key',
        pubId: 'your_pub_id',
        appId: 'your_app_id',
        userId: 'user_123',
        baseUrl: 'https://notik.me',
      ));
    } on NotikInitException catch (e) {
      print('Init failed: ${e.message}');
      return;
    }
  }
  NotikOfferwall.show(context);
}

How It Works #

Init Flow (4 steps, happens once) #

NotikOfferwall.init(config)
    |
    1. Collect device info (Flutter plugins + native hardware)
    |   - 40+ fields: for fraud control
    |   - Generates SHA-256 device fingerprint from stable hardware properties
    |
    2. POST /api/sdk/verify
    |   - Sends: api_key, pub_id, app_id, device_fingerprint
    |   - Backend validates publisher + app credentials
    |   - Returns: token (30 min)
    |
    3. POST /api/sdk/device
    |   - Sends: unique device info
    |   - Backend stores device record for future offer requests
    |
    4. SDK ready

Offer Fetch Flow (lightweight, every request) #

GET /api/sdk/offers?sort=star&category=cpe
    Headers:
      Authorization: Bearer <token>
      X-Device-Fingerprint: <sha256>
      X-Device-Ad-Id: <gaid or idfa>

    Backend:
      1. Validates token + fingerprint + IP + ad ID
      2. Resolves device/publisher from stored device record
      3. Returns offers (same logic as web offerwall)

Security (every request validated by backend) #

Check What
Bearer token token, not expired
Fingerprint Header matches token's stored fingerprint
IP binding Request IP matches IP when token was issued
Ad ID GAID/IDFA matches registered device
Rate limit
Auto-kill

Theming #

NotikOfferwall.init(NotikConfig(
  // ...credentials...
  theme: NotikTheme(
    primaryColor: Colors.deepPurple,
    backgroundColor: Colors.white,
    onSurfaceColor: Colors.black87,
    buttonTextColor: Colors.white,
    appBarTitle: 'Earn Rewards',
    useDarkTheme: false,
  ),
));

Or use presets:

theme: NotikTheme.dark(),
theme: NotikTheme.light(),

Full API #

Method Description
NotikOfferwall.init(config) Initialize SDK, verify credentials, register device, get auth token
NotikOfferwall.show(context) Open offerwall full-screen
NotikOfferwall.showAsBottomSheet(context) Open offerwall as bottom sheet
NotikOfferwall.showRewardHistory(context) Open reward history screen
NotikOfferwall.hasOffers() Check if offers exist for this user
NotikOfferwall.onPostback(callback) Register postback listener
NotikOfferwall.startPostbackPolling() Start auto-polling for conversions
NotikOfferwall.stopPostbackPolling() Stop polling
NotikOfferwall.checkPostbacks() Manual postback check
NotikOfferwall.isInitialized Whether SDK is ready
NotikOfferwall.dispose() Clean up resources

Backend Endpoints Required #

Endpoint Method Auth Purpose
/api/sdk/verify POST None Validate credentials, issue token
/api/sdk/device POST Bearer + fingerprint Register device hardware
/api/sdk/offers GET Bearer + fingerprint + ad ID Fetch offers

Requirements #

  • Flutter >= 3.16.0
  • Dart >= 3.2.0
  • Android minSdk 21+
  • iOS 13.0+
  • A Notik publisher account (notik.me)

License #

MIT

2
likes
140
points
31
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter SDK for the Notik Offerwall. Provides native offer listing, search, sort, categories, offer details, WebView-based offer flow, and postback tracking.

Homepage

License

MIT (license)

Dependencies

advertising_id, crypto, device_info_plus, flutter, http, package_info_plus, shared_preferences, url_launcher, webview_flutter

More

Packages that depend on notik_offerwall

Packages that implement notik_offerwall