Skip to content

✨ Expose CameraPickerConfig.systemOverlayStyle - #328

Merged
AlexV525 merged 1 commit into
mainfrom
feat/system-overlay-style
Jul 25, 2026
Merged

✨ Expose CameraPickerConfig.systemOverlayStyle#328
AlexV525 merged 1 commit into
mainfrom
feat/system-overlay-style

Conversation

@AlexV525

Copy link
Copy Markdown
Member

Summary

  • Expose CameraPickerConfig.systemOverlayStyle so callers can fully replace the SystemUiOverlayStyle applied while the picker (and its viewer) is on screen.
  • Expose CameraPickerConfig.defaultSystemOverlayStyle as the picker's default: transparent status/navigation bars with light icons, systemNavigationBarDividerColor: Colors.transparent, and systemNavigationBarContrastEnforced: false.
  • Apply the same AnnotatedRegion<SystemUiOverlayStyle> inside CameraPickerViewerState so the pushed viewer route stays consistent with the picker.

The previous default only set systemNavigationBarIconBrightness/statusBarIconBrightness/statusBarBrightness, leaving systemNavigationBarColor and systemNavigationBarContrastEnforced unset. 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.black on devices where transparency is not honored).

AnnotatedRegion is inherently scoped, so the previous route's overlay style is automatically restored once the picker/viewer is popped.

Resolves #315

Test plan

  • Reproduce [BUG] Android底部虚拟导航栏背景异常 #315 on an Android 9 device with a virtual navigation bar: previous route sets 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.
  • Verify the picker's status/navigation bar icons remain light on Android 10+ and iOS.
  • Pop the picker and confirm the previous route's overlay style is restored.
  • Pass a custom CameraPickerConfig(systemOverlayStyle: ...) and confirm it is honored on both the picker and the viewer.

🤖 Generated with Claude Code

Resolves #315

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@AlexV525
AlexV525 merged commit e75a87e into main Jul 25, 2026
7 checks passed
@AlexV525
AlexV525 deleted the feat/system-overlay-style branch July 25, 2026 17:18
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.

[BUG] Android底部虚拟导航栏背景异常

1 participant