Skip to content

Add flutter_aepoptimize plugin for Adobe Optimize SDK#165

Open
akhiljain1907 wants to merge 4 commits into
adobe:mainfrom
akhiljain1907:feature/flutter-aepoptimize-plugin
Open

Add flutter_aepoptimize plugin for Adobe Optimize SDK#165
akhiljain1907 wants to merge 4 commits into
adobe:mainfrom
akhiljain1907:feature/flutter-aepoptimize-plugin

Conversation

@akhiljain1907

@akhiljain1907 akhiljain1907 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Description
Adds the flutter_aepoptimize plugin — a complete Flutter wrapper for the native AEP Optimize iOS and Android SDKs.

APIs:

Optimize.updatePropositions() / getPropositions() — fetch and retrieve personalization offers
Optimize.onPropositionsUpdate() — persistent listener for cache updates
Optimize.clearCachedPropositions() — clear client-side cache
Optimize.displayed() / generateDisplayInteractionXdm() — batch offer tracking
Offer.displayed() / tapped() — single offer tracking
Offer.generateDisplayInteractionXdm() / generateTapInteractionXdm() — XDM generation
OptimizeProposition.generateReferenceXdm() — proposition-level XDM
Models: DecisionScope, OptimizeProposition, Offer, OfferType

Multiple native API overloads (no-callback, callback, callback+timeout) are consolidated into single Dart methods with optional parameters.

Motivation and Context
The AEP Optimize SDK was the only remaining AEP extension without a Flutter plugin. This brings Flutter to parity with the existing React Native Optimize plugin, enabling Flutter apps to use Adobe Target and Offer Decisioning through the Edge Network.

How Has This Been Tested?
636 lines of Dart unit tests covering:
API method invocation and argument serialization
Response decoding from method channel
Model roundtrips (fromMap / toMap)
Enum conversions (int ↔ OfferType, MIME string mapping)
Listener callback registration and firing
Edge cases (null/missing fields, empty responses)
Manual testing on iOS simulator and Android emulator via example app

Screenshots (if appropriate):

simulator_screenshot_F048D209-01F7-4EF1-85A9-318F65C4A803

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Introduces a complete Flutter method-channel plugin wrapping the native
AEP Optimize iOS (AEPOptimize ~>5.0) and Android (optimize via BOM 3.x)
SDKs. Multiple native API overloads (no-callback, callback, callback+timeout)
are consolidated into single Dart methods with optional parameters.

Dart API: Optimize.updatePropositions, getPropositions, onPropositionsUpdate,
clearCachedPropositions. Models: DecisionScope, OptimizeProposition, Offer,
OfferType. Offer tracking: displayed(), tapped(), generateDisplayInteractionXdm(),
generateTapInteractionXdm(). Proposition: generateReferenceXdm().

Includes 636 lines of Dart unit tests covering API invocation, response
decoding, model roundtrips, enum conversions, listener callbacks, and
edge cases.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@akhiljain1907 akhiljain1907 requested review from ashumadobe and navratan-soni and removed request for ashumadobe June 20, 2026 11:29
… reference which becomes null once offer are retrieved and tracking calls are performed later on it.
@akhiljain1907 akhiljain1907 marked this pull request as ready for review June 30, 2026 19:13
@akhiljain1907 akhiljain1907 requested a review from Harjot1508 June 30, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant