myChips SDK
  • Introduction
  • Getting Started
    • Create a Publisher Account
    • Create your App/Site
    • Create an AdUnit
    • Test in Sanbox mode
  • Reward Handling
    • Webhook S2S Postback
    • Validating the Webhook S2S
    • Rejected S2S Webhook Postback
  • Billing
  • Unity
    • Install SDK
    • Reward User
    • FAQ
  • Android
    • Install SDK
    • Reward User
  • React Native
    • Install SDK
    • Reward User
  • RN Expo
    • Install SDK
    • Reward User
  • iOS
    • Install SDK
    • Reward User
  • Flutter
    • Install SDK
    • Reward User
  • iFrame
  • WebView & Direct Link
  • Revenue API
Powered by GitBook
On this page
  • 1. Introduction
  • 2. SDK Integration
  • 3. Initializating the SDK
  • 4. Display the Offerwall
  1. Flutter

Install SDK

PreviousFlutterNextReward User

Last updated 4 months ago

1. Introduction

This guide provides a comprehensive walkthrough for integrating the MyChips SDK into your Flutter application, enabling the display of an engaging offerwall.

2. SDK Integration

To add the package to your project folder using the terminal:

 $ flutter pub add my_chips_flutter_sdk

Now in your main.dart code, you can import it:

import 'package:my_chips_flutter_sdk/my_chips_flutter_sdk.dar

3. Initializating the SDK

Before using the sdk or showing the offerwall you must initialize it:

//replace "YOUR_API_KEY"
await MCOfferwallSdk.instance.init("YOUR_API_KEY");

Obtain your API key and User ID from

3.1 (Optional) Set userId if you have your own unique id

//replace "YOUR_USER_ID"
await MCOfferwallSdk.instance.setUserId("YOUR_USER_ID"); 

Replace "YOUR_USER_ID" with your actual user ID variable or value.

If you do not provide a specific user ID, one will be automatically generated.

4. Display the Offerwall

To show the offerwall we provide you with a widget called OfferwallPage. You should show it as a page using your preferred navigation package/method.

Example using the default flutter navigator:

//replace "YOUR_AD_UNIT_ID"
Navigator.of(context).push(
    MaterialPageRoute(
        builder: (context) => OfferwallPage(
        adunitId: "YOUR_AD_UNIT_ID",
        ),
    ),
);

Your Ad unit ID can be found at

Universal Developer Portal
here