Uptick Ads Flutter SDK

Introduction

The Uptick Ads Flutter SDK allows seamless integration of Uptick Ads into your Flutter applications. This SDK provides a simple and efficient way to display advertisements while maintaining performance and user experience.

Features

  • Compatible with Flutter 3
  • Includes an example app to demonstrate SDK integration
  • Includes setup instructions to run the example folder
  • Supports multiple ad formats i.e. Popup, Inline and Popup then Inline
  • Dynamic Offer Rendering: Display offers tailored to specific contexts and user data.
  • Multiple Placements: Supports predefined placements such as order_confirmation, order_status, and survey.
  • Automatic Flow Management: Fetches and updates offers dynamically based on integration details.
  • Cross-Platform Support: Works on both Android and iOS.

Installation

To use this SDK in your Flutter project, follow these steps:

1. Add Dependency

Add the following lines to your pubspec.yaml:

 flutter pub add uptick_ads

Run

flutter pub get

2. Import the SDK

import 'package:uptick_ads/screens/uptick_widget.dart';

Setup

1. Platform-Specific Configuration

Android

android {
    defaultConfig {
        minSdkVersion 26 // Minimum Android version supported
    }
}

iOS

Ensure your ios/Podfile includes the following configuration:

platform :ios, '11.0' // Minimum iOS version supported

Usage

Display Uptick Offers

Use the UptickWidget to display full-screen or modal pop-up offers. Customize the placement and integration ID as needed.

import 'package:uptick_ads/screens/uptick_widget.dart';

UptickWidget(
  integrationId: "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE",
  placement: "order_confirmation",
)

Example Usage

Here’s a complete example of how to use the plugin to display an inline offer:

import 'package:flutter/material.dart';
import 'package:uptick_ads/screens/uptick_widget.dart';

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Flutter Uptick Plugin Example'),
      ),
      body: Center(
         child: UptickWidget(
              integrationId: "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE",
              placement: "order_status",
      ),
    ));
  }
}

Running the Example App

1. Clone the SDK that contains the example app

git clone https://github.com/uptick-ads/flutter-sdk

2. Navigate to the example app

cd example

3. Get the dependencies

flutter pub get

4. Run the the example app

flutter run

Plugin Details

This plugin supports both Android and iOS platforms:

flutter:
  plugin:
    platforms:
      android:
        package: com.example.uptick_ads
        pluginClass: FlutterUptickPlugin
      ios:
        pluginClass: FlutterUptickPlugin

License

This SDK is released under the MIT License.

Support

For any issues or contributions, please open an issue or submit a pull request on the GitHub repository.