Skip to main content
Version: v1

RapidoReach Flutter SDK

The RapidoReach Flutter plugin lets you show rewarded survey content in your Flutter app and receive reward events.

Requirements

  • Flutter: >= 3.0.0
  • Dart: ^3.8.0
  • Android: minSdk 23
  • iOS: minimum deployment target 12.0

Install

Add the dependency:

dependencies:
rapidoreach: ^1.1.2

Then run:

flutter pub get

The plugin resolves the native SDKs as follows:

  • Android: com.rapidoreach:cbofferwallsdk:1.1.0 from Maven Central.
  • iOS: RapidoReach Objective-C sources based on iOS SDK 1.0.9.

Initialize

Initialize once after your app starts or after the user logs in:

import 'package:rapidoreach/rapidoreach.dart';

await RapidoReach.instance.init(
apiToken: 'YOUR_API_TOKEN',
userId: 'YOUR_USER_ID',
);

Show the offerwall

await RapidoReach.instance.showRewardCenter();

Reward callbacks

For production reward attribution, use server-side callbacks whenever possible. Client-side reward events are also available:

RapidoReach.instance.setOnRewardListener((quantity) {
// quantity is the converted virtual currency amount.
});

Events

RapidoReach.instance.setRewardCenterOpened(() {});
RapidoReach.instance.setRewardCenterClosed(() {});
RapidoReach.instance.setSurveyAvaiableListener((available) {});
RapidoReach.instance.setOnErrorListener((message) {});

Placement flows

final tag = 'default';
final canShow = await RapidoReach.instance.canShowContent(tag: tag);
if (!canShow) return;

final surveys = await RapidoReach.instance.listSurveys(tag: tag);
final firstSurveyId = surveys.isNotEmpty
? surveys.first['surveyIdentifier']?.toString()
: null;
if (firstSurveyId == null || firstSurveyId.isEmpty) return;

await RapidoReach.instance.showSurvey(
tag: tag,
surveyId: firstSurveyId,
customParams: {'source': 'home_screen'},
);

For the full current guide, see the latest Flutter SDK documentation.