-
Notifications
You must be signed in to change notification settings - Fork 825
fix: status bar displays black icons instead of white. #3028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: flutter
Are you sure you want to change the base?
Conversation
Reviewer's GuideSets the system status bar icon brightness to light (white icons) across multiple configuration and scaffold screens by updating each AppBar’s SystemUiOverlayStyle configuration. Flow diagram for AppBar system overlay style with light status bar iconsgraph TD
User["User opens any config or scaffold screen"] --> FlutterApp
FlutterApp --> ScreenState
ScreenState --> AppBar
AppBar --> SystemUiOverlayStyle
SystemUiOverlayStyle -->|statusBarColor appBarColor| AndroidStatusBar
SystemUiOverlayStyle -->|statusBarIconBrightness Brightness.light| AndroidStatusBar
AndroidStatusBar["Android system status bar"] --> RenderedStatusBar["Rendered status bar with white icons"]
File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've found 1 issue, and left some high level feedback:
- You’re repeating the same
SystemUiOverlayStyleconfiguration across many screens; consider extracting a shared helper or constant (e.g.whiteStatusBarOverlay) to keep this DRY and easier to change later. - On iOS,
statusBarBrightnessis used instead ofstatusBarIconBrightness, so you may want to set both fields inSystemUiOverlayStyleto ensure consistent behavior across platforms.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- You’re repeating the same `SystemUiOverlayStyle` configuration across many screens; consider extracting a shared helper or constant (e.g. `whiteStatusBarOverlay`) to keep this DRY and easier to change later.
- On iOS, `statusBarBrightness` is used instead of `statusBarIconBrightness`, so you may want to set both fields in `SystemUiOverlayStyle` to ensure consistent behavior across platforms.
## Individual Comments
### Comment 1
<location> `lib/view/accelerometer_config_screen.dart:50-55` </location>
<code_context>
resizeToAvoidBottomInset: true,
appBar: AppBar(
- systemOverlayStyle: SystemUiOverlayStyle(statusBarColor: appBarColor),
+ systemOverlayStyle: SystemUiOverlayStyle(
+ statusBarColor: appBarColor,
+ statusBarIconBrightness: Brightness.light,
+ ),
leading: Builder(builder: (context) {
</code_context>
<issue_to_address>
**suggestion:** Consider also setting `statusBarBrightness` for consistent behavior on iOS.
Currently only `statusBarIconBrightness` is set, which mainly impacts Android. On iOS, `statusBarBrightness` is what controls the status bar style. To keep appearance consistent across platforms, set both fields with values that work with `appBarColor` and the desired contrast.
```suggestion
appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle(
statusBarColor: appBarColor,
statusBarIconBrightness: Brightness.light,
statusBarBrightness: Brightness.dark,
),
leading: Builder(builder: (context) {
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Build StatusBuild successful. APKs to test: https://github.com/fossasia/pslab-app/actions/runs/20828828404/artifacts/5067473450. Screenshots |
da1145d to
4d71853
Compare







-1_instruments_screen.png?raw=true)
-2_nav_drawer.png?raw=true)
-3_accelerometer.png?raw=true)
-4_power_source.png?raw=true)
-5_multimeter.png?raw=true)
-6_wave_generator.png?raw=true)
-7_oscilloscope.png?raw=true)
Fixes #2906
Changes
Changed status bar icon color to white.
Screenshots / Recordings
Before:


After:
Checklist:
constants.dartor localization files instead of hard-coded values.dart formator the IDE formatter.flutter analyzeand tests run influtter test.Summary by Sourcery
Bug Fixes: