encore_flutter library

Flutter plugin wrapping the native Encore iOS and Android SDKs.

Provides monetization, offers, and entitlements through platform channels backed by the Encore XCFramework (iOS) and AAR (Android) binaries.

import 'package:encore_flutter/encore_flutter.dart';

await Encore.shared.configure(
  apiKey: 'your_key',
  purchaseController: AppPurchases(),
);
await Encore.shared.identify(userId: 'user_123');
final result = await Encore.placement('cancel_flow').show();

Classes

AppearanceConfig
Brand colours for one Encore trigger component (EncoreGiftsButton, EncoreClaimReminder, EncoreTrigger).
Encore
Main entry point for the Encore Flutter SDK.
EncoreAdvertiserClaimed
The claim flow completed on-device; server verification not (yet) observed.
EncoreAdvertiserCooldown
On Android, the server refused the claim with an HTTP 409 other than "already completed". In practice this is the trial limit: the user has reached the app's limit on completed offers. iOS no longer produces it from iOS SDK 2.3.0, where a refused claim is an ordinary claim error and the sheet stays open. On both, from 2.3.0, an offer the user already completed is not reported here: the sheet drops it and the user picks another.
EncoreAdvertiserFailed
The claim errored — the SDK-side failure the user never saw.
EncoreAdvertiserNotAttempted
The claim funnel was open and nothing entered it.
EncoreAdvertiserOutcome
Encore's funnel: how far the offer claim got.
EncoreAdvertiserVerified
Server-level confirmation of the claim was observed in-session.
EncoreClaim
Your own gifts button or claim reminder, with Encore behind it: one native claim handle per placement.
EncoreClaimController
Opens the sheet from your own widgets, and hides a reminder. Handed to EncoreClaim.builder; a new handle (after a change of placement, use case or autoOpen) comes with a new controller.
EncoreClaimedOffer
The advertiser offer a claim ran against — the claim's factual payload.
EncoreClaimGiftsState
The reward sheet has offers for this user.
EncoreClaimHiddenState
Draw nothing: no offers here for this user, a holdout, not configured yet, a failure, the churn use case, or a completed claim when Encore hides it after one.
EncoreClaimReminder
A banner that reminds the user of an offer they claimed but have not finished. A tap opens the Encore sheet for useCase at placement, with that offer in it. Once the claimed offer completes, Encore may show its thank-you look instead, as the served look says.
EncoreClaimReminderState
The user claimed an offer the sheet still lists and has not finished it.
EncoreClaimState
What an EncoreClaim says to draw. Switch over it: there are exactly four states.
EncoreClaimThanksState
When Encore shows a thank-you: the user finished an offer today; say thanks. The offers still waiting, as EncoreClaimGiftsState has them. A tap opens the sheet, then the state is gifts again.
EncoreGiftsButton
A button or card ("You have a gift") that opens the Encore sheet for useCase at placement, as Encore.placement(placement).useCase(useCase).show() would.
EncoreNotPresented
Nothing appeared. reason says why — presentation-level failures are values here, never thrown.
EncorePlacementBuilder
Fluent builder for presenting Encore offers.
EncorePlacementOutcome
An event on Encore.outcomes.
EncorePlacementPresentation
A presentation flow resolved and its record sealed. Emitted for every show(), including the ones that presented nothing.
EncorePresentationOutcome
The record of a presented flow.
EncorePresentationResult
The factual record of a placement presentation.
EncorePresented
The sheet appeared. outcome carries both funnels and the dismissal.
EncorePublisherReward
Your app's own prize for trying one partner offer ("100 coins", "7 days of Premium"), passed on a placement with EncorePlacementBuilder.publisherReward.
EncorePublisherRewardPolicy
Limits on how often the reward-for-trying prize can be earned, set with Encore.setPublisherRewardPolicy.
EncorePurchaseController
Runs a purchase on Encore's behalf.
EncorePurchaseRequest
Context handed to your EncorePurchaseController when Encore's offer flow triggers a purchase.
EncoreStrictUnlockVerified
A previously claimed offer verified server-side after its presentation ended — possibly on a later launch, under EncoreUnlockMode.strict cross-launch reconciliation.
EncoreTrigger
An Encore trigger: a small native view, chosen by id, that Encore fills from a server variant for this user, for example the gifts button ('giftsButton', also available as EncoreGiftsButton) or the claim reminder ('claimReminder', also EncoreClaimReminder).
EncoreUserAttributes
Structured user attributes for offer targeting and personalization.
SheetAppearance
The reward sheet's fonts, set as AppearanceConfig.sheet.

Enums

EncoreAlignment
Where a trigger's look sits in the width it is given, when the look is narrower (the served look caps its width). Follows the text direction, so leading is the right edge in a right-to-left layout.
EncoreAutoOpen
Opts a gifts button out of opening its sheet by itself.
EncoreClaimTarget
What a tap on your claim view stands for, as analytics counts it. On gifts and thanks every tap counts as button; on a reminder button counts as card, the whole view.
EncoreColorScheme
Light or dark for a trigger component's palette.
EncoreDismissReason
How a presented offer sheet went away.
EncoreLogLevel
Log verbosity levels for the Encore SDK.
EncoreNotPresentedReason
Why no offer sheet ever appeared.
EncorePublisherOutcome
The host's funnel: what your EncorePurchaseController reported back.
EncorePurchaseResult
What your purchase code reported back to Encore.
EncoreTriggerIcon
The icon a trigger's look draws in its gift spot.
EncoreUnlockMode
How a claim is verified in-flow. Set once, at Encore.configure.
EncoreUseCase
What a placement is being shown to achieve.

Typedefs

EncoreClaimWidgetBuilder = Widget Function(BuildContext context, EncoreClaimState state, EncoreClaimController controller)
Draws an EncoreClaim: your widget for state, with controller to open the sheet from your own buttons.