Repository navigation
feat: GleapBannerArea keeps the app below inline banners - #46
Merged
Merged
Conversation
Forwards the native bannerHeightChanged callback into Gleap.bannerHeight (read once more on initialize for hot restarts and new engines) and adds GleapBannerArea, which pads the app down by the banner's height (animated) and shrinks the top safe-area padding by the same amount. The example app wraps MaterialApp in it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 16, 2026
feat: banner-height-changed event and getBannerHeight() for inline banners
GleapSDK/Capacitor-SDK#30
Merged
Merged
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.
Customer ask (Operátor ICT, Prague public transport app, ticket 129428): inline banners in Flutter cover the app instead of pushing it down like on the web. They want them for service-outage notices sent from the dashboard.
Usage
While an inline banner is shown, the app is padded down by the banner's height (animated, 250 ms ease-out) and the top safe-area padding in
MediaQueryshrinks by the same amount, since the banner covers the status bar. SoAppBar/SafeAreadon't add a second status-bar gap, and full-bleed content such as maps moves down too. Floating banners still float. Opt-in, so no existing app changes.Gleap.bannerHeight(ValueListenable<double>, logical px) is exposed for custom layouts. Web does nothing: the JS SDK already pushes the page.Plumbing: native
bannerHeightChanged→ method channel →Gleap.bannerHeight; read once more withgetBannerHeightafterinitialize, because the native SDKs only report changes (hot restart, new Flutter engine).Depends on GleapSDK/Gleap-iOS-SDK#58 and GleapSDK/Android-SDK#53. The native pins stay at 19.2.4 here, so this compiles only once those are released and the pins are bumped in the release PR. Merge the native SDKs first.
Tested end to end on the iOS 27 simulator and the Android API 36.1 emulator (targetSdk 33 and 35). The local native branches were wired in via SPM path/mavenLocal, and real inline/floating payloads were fed through the SDKs'
showBanner. That harness is not part of this PR.flutter testpasses (21),flutter analyze libclean🤖 Generated with Claude Code