promotion_overlay 1.0.2
promotion_overlay: ^1.0.2 copied to clipboard
Flutter plugin for displaying the native promotion overlay. Wraps a platform-specific promotional overlay banner (SKOverlay on iOS and macOS).
Promotion Overlay plugin #
Promotion Overlay is a Flutter plugin for iOS and macOS, with future support planned for Android. It shows a native promotional overlay using SKOverlay, enabling users to install advertised apps directly in the background without navigating to the App Store. It includes campaign tracking and control over the overlay's position and visibility.
| Android | iOS | Linux | macOS | Web | Windows | |
|---|---|---|---|---|---|---|
| Support | - | 14.0+ | - | 14.0+ | - | - |
Usage #
To use this plugin, add promotion_overlay as a dependency in your pubspec.yaml file.
Instantiating the PromotionOverlay object #
You must then specify the following parameters:
appIdentifier(required, The iTunes identifier of the recommended app. (iOS))campaignToken(optional, A token you use to represent an ad campaign and measure its effectiveness. (iOS))providerToken(optional, A token that represents the provider of an app promotion campaign, and that you use to measure the campaign’s effectiveness. (iOS))dismissOnBackground(optional, default: true, A Boolean value that indicates whether the overlay is dismissed when the user switches to another app. (iOS))position(optional, default: .bottom, The position of the overlay on the screen.)
How to use #
// Create an overlay instance
final PromotionOverlay promotionOverlay = PromotionOverlay('identifier',
campaignToken: 'campaignToken', providerToken: 'providerToken');
// Show the promotion overlay
final promotionOverlay = await promotionOverlay.show();
// Dismiss the promotion overlay
promotionOverlay.dismiss();
Testing #
This is still todo.
Overlay by platform #
| Platform | Location |
|---|---|
| Android | - |
| iOS | SKOverlay |
| Linux | - |
| macOS | SKOverlay |
| Web | - |
| Windows | - |