flyshot_sdk 1.0.0 copy "flyshot_sdk: ^1.0.0" to clipboard
flyshot_sdk: ^1.0.0 copied to clipboard

outdated

Plugin to integrate Flyshot SDK to flutter project

Flyshot SDK #

React Native wrapper for Flyshot SDK. This wrapper based on the native IOS Flyshot SDK

Installation Guide #

  1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  flyshot_sdk: ^0.1.0 
  1. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

Note: Do not forget run pod update after package installation. Make sure that your minimum target version in your Podfile is 10.0 or higher.

  1. Import it

Now in your Dart code, you can use:

import 'package:flyshot_sdk/flyshot_sdk.dart';

Usage #

SDK initialization #

To initialize SDK call initialize method with token generated in your Flyshot account:

const sdkToken = '...';
Flyshot.initialize(sdkToken): Feature

To start SDK call start method:

Flyshot.start();

Are you using AppsFlyer to track events? Just use setAppsFlyerId method to set AppsFlyer Id:

const appsflyerId = '...';
Flyshot.setAppsFlyerId(appsflyerId);

Public interface #

Check user_id session variable. Return true if Flyshot user_id session variable is set:

Flyshot.isFlyshotUser(): Feature<bool>

Check active campaign session variable. Return true if Flyshot active campaign session variable is set:

Flyshot.isEligibleForDiscount(): Feature<bool>

Flyshot.isEligibleForPromo(): Feature<bool>

Flyshot.isEligibleForReward(): Feature<bool>

Check if campaign is active:

const productId = '...'; // or null if product is not present
Flyshot.isCampaignActive(productId): Feature<bool>

Send Checkout Event to Flyshot Analytics:

Flyshot.sendConversionEvent(double amount, [String productId, String currency]): Feature

Note: You can pass null instead of productId and pass null instead of currency (USD will be used)

Send Custom Event to Flyshot Analytics:

Flyshot.sendEvent(String eventName): Feature

Send Sign Up Event to Flyshot Analytics:

Flyshot.sendSignUpEvent(): Feature

Set list of product ids which should not processed:

Flyshot.setBlockedPurchasesList(Array<String>): Feature

Open promo board manually:

Flyshot.requestPromoBanner(): Feature

Upload screenshot (response will return campaign search status: 0 - not found, 1 - found, 2 - redeemed):

Flyshot.upload(): Feature<int>

Get available content for your application:

Flyshot.getContent(): Future<dynamic>

Events #

You should use a callback function to subscribe Flyshot events. For example:

  Flyshot.onFlyshotPurchase((params) async {
    log("onFlyshotPurchase event listener invoked with params " + params.toString());
  });

  Flyshot.onFlyshotCampaignDetected((params) async {
    log("onFlyshotCampaignDetected event listener invoked with params " + params.toString());
  });
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Plugin to integrate Flyshot SDK to flutter project

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flyshot_sdk