Add flutter_aepoptimize plugin for Adobe Optimize SDK#165
Open
akhiljain1907 wants to merge 4 commits into
Open
Add flutter_aepoptimize plugin for Adobe Optimize SDK#165akhiljain1907 wants to merge 4 commits into
akhiljain1907 wants to merge 4 commits into
Conversation
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>
…osition object reference to
… reference which becomes null once offer are retrieved and tracking calls are performed later on it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
Types of changes
Checklist: