Skip to content

feat(banner): expose windowFullscreen setting on android bridge - #201

Merged
asadraza-usercentrics merged 1 commit into
masterfrom
feat/MSDK-4637-flutter-window-fullscreen
Aug 27, 2026
Merged

feat(banner): expose windowFullscreen setting on android bridge#201
asadraza-usercentrics merged 1 commit into
masterfrom
feat/MSDK-4637-flutter-window-fullscreen

Conversation

@asadraza-usercentrics

Copy link
Copy Markdown
Collaborator

Summary

Part of MSDK-4637 (Flutter edge-to-edge support, epic MSDK-3513). Same gap as MSDK-4636 on the React Native bridge: the MSDK-3736 fix (windowIsFloating=false) is already released and consumed — confirmed present in usercentrics-ui 2.29.0+ and already pinned via android/build.gradle's usercentrics_version = "2.30.0" — so no dependency bump was needed. What remained was GeneralStyleSettings.windowFullscreen, which exists in the core SDK but was never exposed through the Flutter bridge, leaving publishers with no way to set the fullscreen backward-compat workaround from Flutter.

Changes

  • lib/src/model/general_style_settings.dart — added windowFullscreen field, including ==, hashCode, and toString() (this class hand-rolls value equality, no code-gen)
  • lib/src/internal/serializer/general_style_settings_serializer.dart — serialize windowFullscreen into the map sent over the platform channel
  • android/src/main/kotlin/com/usercentrics/sdk/flutter/serializer/GeneralStyleSettingsSerializer.kt — read windowFullscreen in deserializeGeneralStyleSettings() and pass it into the core SDK's GeneralStyleSettings(...)
  • example/android/app/src/main/kotlin/com/usercentrics/sdk/flutter_example/MainActivity.kt — committed the edge-to-edge opt-in (WindowCompat.setDecorFitsSystemWindows(window, false))
  • example/lib/window_fullscreen_example.dart + example/lib/main.dart — new example scenario and "Window Fullscreen (Android)" button so the field is exercisable end-to-end, not just plumbed
  • test/internal/bridge/show_first_layer_bridge_test.mock.dart + show_second_layer_bridge_test.mock.dart — updated the two fixtures that assert exact serialized argument maps to include the new windowFullscreen key

No iOS changes (Android-only backward-compat field, per ticket scope) and no mobile-sdk core changes (field already exists there).

Testing

  • flutter analyze — 0 issues

  • flutter test — 64/64 passing, including the 2 updated bridge fixtures

  • Built and installed the example app (flutter build apk --debug + adb install) on an Android emulator — clean install/launch, no crashes

  • Full banner matrix manually exercised via the example app and verified via adb/dumpsys window:

    # Scenario Result
    1 windowFullscreen: true reaches native (Window Fullscreen button) ✅ dialog window frame=[0,0][1080,2340], full display bounds
    2 Backward-compat on API 33/34
    3 Backward-compat on API 35+
    4 Sheet (Show First Layer)
    5 Popup Bottom (Customization Example 1) ✅ window not clipped
    6 Fullscreen without the workaround (Customization Example 2) ✅ same full-bounds frame as scenario 1
    7 Second Layer ✅ full-bounds frame, close button shown as expected (showCloseButton: true set explicitly in that call)
    8 Regression check — default first layer, windowFullscreen unset ✅ no crash, no unintended fullscreen behavior

    8/8 scenarios passed. MSDK-4613 (dim-scrim gap on API 33) reproduces here too, as expected — already tracked, out of scope for this ticket.

Acceptance Criteria

  • windowFullscreen exposed in the Dart model, Dart serializer, and native Kotlin serializer
  • Example app's MainActivity edge-to-edge opt-in committed
  • Full banner matrix verified against the committed example app on API 33/34 and API 35+
  • windowFullscreen backward-compat scenario exercised end-to-end via F
  • QA writeup posted on the ticket — will post after this PR merges, mirroring the MSDK-4636 comment

Notes

Android Kotlin compile was verified via manual signature match against the core SDK's actual GeneralStyleSettings constructor in mobile-sdk; CI's Android job compiles it directly on this PR.

MSDK-4637: windowFullscreen already existed in the core SDK's
GeneralStyleSettings but was never plumbed through the Flutter
bridge, so publishers relying on the fullscreen backward-compat
workaround had no way to set it from Flutter — the same gap already
closed on the React Native bridge (MSDK-4636). Adds the field to the
Dart model and its Dart/Kotlin serializers, commits the example
app's edge-to-edge opt-in, and wires an example scenario to exercise
the new field end-to-end. Updates the two bridge test fixtures that
assert exact serialized argument maps.
@asadraza-usercentrics
asadraza-usercentrics merged commit 4ccebc4 into master Aug 27, 2026
14 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