✨ Expose CameraPickerConfig.systemOverlayStyle - #328
Merged
Conversation
Resolves #315 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
CameraPickerConfig.systemOverlayStyleso callers can fully replace theSystemUiOverlayStyleapplied while the picker (and its viewer) is on screen.CameraPickerConfig.defaultSystemOverlayStyleas the picker's default: transparent status/navigation bars with light icons,systemNavigationBarDividerColor: Colors.transparent, andsystemNavigationBarContrastEnforced: false.AnnotatedRegion<SystemUiOverlayStyle>insideCameraPickerViewerStateso the pushed viewer route stays consistent with the picker.The previous default only set
systemNavigationBarIconBrightness/statusBarIconBrightness/statusBarBrightness, leavingsystemNavigationBarColorandsystemNavigationBarContrastEnforcedunset. On Android 9- with a virtual navigation bar, that caused the system to paint a light contrast scrim behind the picker's light icons (issue #315). Filling in the missing fields fixes that, and exposing the config lets callers override the whole style when a different platform needs a different behavior (e.g.Colors.blackon devices where transparency is not honored).AnnotatedRegionis inherently scoped, so the previous route's overlay style is automatically restored once the picker/viewer is popped.Resolves #315
Test plan
SystemUiOverlayStyle.light.copyWith(systemNavigationBarColor: Colors.transparent, systemNavigationBarIconBrightness: Brightness.dark, ...), then push the picker and confirm the navigation bar no longer renders a light scrim with invisible icons.CameraPickerConfig(systemOverlayStyle: ...)and confirm it is honored on both the picker and the viewer.🤖 Generated with Claude Code