Skip to content

Conversation

@Yugesh-Kumar-S
Copy link
Contributor

@Yugesh-Kumar-S Yugesh-Kumar-S commented Jan 8, 2026

Fixes #2906

Changes

Changed status bar icon color to white.

Screenshots / Recordings

Before:
Screenshot_20260109-001015 (1)
After:
Screenshot_20260109-001851 (1)

Checklist:

  • No hard coding: I have used values from constants.dart or localization files instead of hard-coded values.
  • No end of file edits: No modifications done at end of resource files.
  • Code reformatting: I have formatted the code using dart format or the IDE formatter.
  • Code analysis: My code passes checks run in flutter analyze and tests run in flutter test.

Summary by Sourcery

Bug Fixes:

  • Fix status bar icons appearing with incorrect (dark) coloring on various configuration and scaffold screens.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 8, 2026

Reviewer's Guide

Sets 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 icons

graph 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"]
Loading

File-Level Changes

Change Details Files
Ensure all affected screens use white status bar icons to match the app bar design.
  • Update each AppBar to construct a SystemUiOverlayStyle with both statusBarColor and statusBarIconBrightness configured instead of passing only statusBarColor.
  • Set statusBarIconBrightness to Brightness.light on all relevant screens to force white status bar icons on Android.
  • Apply the same overlay style pattern consistently across sensor configuration screens, settings, and common/main scaffold widgets for uniform status bar appearance.
lib/view/accelerometer_config_screen.dart
lib/view/barometer_config_screen.dart
lib/view/gyroscope_config_screen.dart
lib/view/logic_analyzer_config_screen.dart
lib/view/luxmeter_config_screen.dart
lib/view/multimeter_config_screen.dart
lib/view/oscilloscope_config_screen.dart
lib/view/power_source_config_screen.dart
lib/view/settings_screen.dart
lib/view/soundmeter_config_screen.dart
lib/view/wave_generator_config_screen.dart
lib/view/widgets/common_scaffold_widget.dart
lib/view/widgets/main_scaffold_widget.dart

Assessment against linked issues

Issue Objective Addressed Explanation
#2906 Ensure the top phone/status bar uses white icons/text on top of the red app bar background across the affected screens.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a 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 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.
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>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

Build Status

Build successful. APKs to test: https://github.com/fossasia/pslab-app/actions/runs/20828828404/artifacts/5067473450.

Screenshots

Android Screenshots
iPhone Screenshots
iPad Screenshots

@Yugesh-Kumar-S Yugesh-Kumar-S self-assigned this Jan 8, 2026
@Yugesh-Kumar-S Yugesh-Kumar-S added the Fix Solution to an existing issue in app label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Solution to an existing issue in app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Top phone bar displays black font instead of white font

1 participant