SDK-6019: Make Flutter ND plugin pure-Dart; surface attribution to client - #82
Merged
CTLalit merged 1 commit intoAug 13, 2026
Conversation
…ient Attribution now flows through the host's clevertap_plugin Dart APIs, so the ND plugin's native side is removed entirely and the plugin becomes pure Dart. Supersedes the native portions of SDK-6009/6010/6013. - Remove flutter/android/ and flutter/ios/ (native plugin + the SDK-6013 podspec); drop the flutter.plugin.platforms block from pubspec — now a regular Flutter/Dart package. Keep flutter/LICENSE. - NativeDisplayBridge slimmed to a pure-Dart helper: setLogLevel(NDLogLevel) and syncLogLevelFromCore(int) → NDLogger.syncFromCoreSdk (client-wins guard intact). All MethodChannel/EventChannel usage and fetchConfig/eventStream/ pushEvent/pushViewed/pushClicked/getCoreDebugLevel removed. - Attribution surfaced to the host via NativeDisplayView callbacks: onNotificationViewed(unitId) — fired once per impression via ViewedUnitsTracker; onNotificationClicked(unitId, elementId, extras) — extras built by ActionAttributionExtras. New NotificationClickScope (mirrors UnitIdScope) lets elements read the callback from context. Host feeds these into clevertap_plugin pushDisplayUnitViewedEvent / pushDisplayUnitElementClickedEvent. - Re-lower the version floor: with compileSdk 36 gone, the binding constraint is webview_flutter 4.9.0 → Flutter 3.24 / Dart 3.5 (down from SDK-6013's 3.27). - Tests: replace native arg-shape tests with pure-Dart log-level tests; add native_display_attribution_test.dart (viewed once/impression, click extras). - gitignore the pub-generated flutter/.flutter-plugins* registrants. flutter pub get resolves; flutter analyze clean; flutter test 213 pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Jira: SDK-6019 — epic SDK-5820
Attribution now flows through the host's clevertap_plugin Dart APIs, so the
ND plugin's native side is removed entirely and the plugin becomes pure Dart.
Supersedes the native portions of SDK-6009/6010/6013.
podspec); drop the flutter.plugin.platforms block from pubspec — now a
regular Flutter/Dart package. Keep flutter/LICENSE.
and syncLogLevelFromCore(int) → NDLogger.syncFromCoreSdk (client-wins guard
intact). All MethodChannel/EventChannel usage and fetchConfig/eventStream/
pushEvent/pushViewed/pushClicked/getCoreDebugLevel removed.
onNotificationViewed(unitId) — fired once per impression via ViewedUnitsTracker;
onNotificationClicked(unitId, elementId, extras) — extras built by
ActionAttributionExtras. New NotificationClickScope (mirrors UnitIdScope) lets
elements read the callback from context. Host feeds these into
clevertap_plugin pushDisplayUnitViewedEvent / pushDisplayUnitElementClickedEvent.
webview_flutter 4.9.0 → Flutter 3.24 / Dart 3.5 (down from SDK-6013's 3.27).
native_display_attribution_test.dart (viewed once/impression, click extras).
flutter pub get resolves; flutter analyze clean; flutter test 213 pass.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
Stack created with GitHub Stacks CLI • Give Feedback 💬