Skip to content

Add BannerInitCustomization support (init-time and show-time) - #187

Merged
uc-brunosilva merged 3 commits into
masterfrom
feature/banner-init-customization
Jul 15, 2026
Merged

Add BannerInitCustomization support (init-time and show-time)#187
uc-brunosilva merged 3 commits into
masterfrom
feature/banner-init-customization

Conversation

@uc-brunosilva

Copy link
Copy Markdown
Contributor

Summary

  • Exposes bannerCustomization on init (Usercentrics.initialize) and initCustomization on show-time (BannerSettings), mirroring the native BannerInitCustomization API already shipped in usercentrics-android/iOS 2.28.0.
  • Implemented across Dart model/serializer, Android Kotlin bridge, and iOS Swift bridge.
  • All fields nullable; unset fields are passed through as JSON null (not coerced to 0/false/""), matching native's "inherit from the layer below" semantics.
  • Deprecation warning mirrored from the native SDK on all three layers, since BannerInitCustomization is deprecated upstream (no removal date yet).

Test plan

  • flutter analyze — clean
  • flutter test — 64/64 passing
  • Android ./gradlew :usercentrics_sdk:testDebugUnitTest — passing, no warnings
  • iOS xcodebuild release build — succeeds
  • iOS RunnerTests — 33/33 passing, including a round-trip assertion for initCustomization
  • Manual smoke test on device with real bannerCustomization/initCustomization values

🤖 Generated with Claude Code

uc-brunosilva and others added 3 commits July 14, 2026 17:34
Exposes bannerCustomization (init-time, on UsercentricsOptions) and
initCustomization (show-time, on BannerSettings) so Flutter apps can
apply the same predefined-banner style overrides already available on
native Android/iOS, matching CPD-109/MSDK-4161/4167-4170.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…lues

assert(false) crashes debug builds but is compiled out of release,
silently returning nil there instead — collapse to a plain nil so
behavior is consistent across build configurations.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
BannerInitCustomization was marked @deprecated in the same commit that
introduced it, so internal plumbing referencing it (bridges,
serializers, platform interface, test fakes) triggered
deprecated_member_use_from_same_package, and flutter analyze fails CI
on any reported issue. Suppress with the existing project convention
and fix two test ignore-comments that used the wrong lint code.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@uc-brunosilva

Copy link
Copy Markdown
Contributor Author

AI review skipped on this PR.

@uc-brunosilva
uc-brunosilva merged commit 99ef80e into master Jul 15, 2026
11 checks passed
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.

3 participants