Skip to content

Flutter 3.16 having bug on overriding the iOS systemOverlayUI statusBarBrightness #138671

@issacbot1499

Description

@issacbot1499

Is there an existing issue for this?

Steps to reproduce

  1. Upgraded to flutter 3.16.0
  2. Try to change the statusBarBrightness inside ThemeData -> AppBarTheme -> systemOverlayStyle
  3. Doesn't has any effect
  4. Change the appearance in device setting, will changes the statusBar text to contrast with the theme selected.
  5. Previously it was working in Flutter version 3.13.9

Expected results

The statusBarBrightness should change when set in ThemeData, no like only follow the system setting.

Actual results

The statusBarBrightness does nothing in the ThemeData -> AppBarTheme -> systemOverlayStyle

Code sample

Code sample
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

import 'color_config.dart';
import 'dimen_config.dart';
import 'text_style_config.dart';

class ThemeConfig {
  static final lightTheme = ThemeData.light().copyWith(
    appBarTheme: AppBarTheme(
      systemOverlayStyle: const SystemUiOverlayStyle(
        statusBarColor: Colors.transparent,
        statusBarIconBrightness: Brightness.dark,
        statusBarBrightness: Brightness.light,
      ),
      titleTextStyle: TextStyleConfig.boldTextStyle(
        fontSize: DimenConfig.textSize_22,
        color: ColorConfig.blackColor,
      ),
      iconTheme: const IconThemeData(
        color: ColorConfig.blackColor,
      ),
    ),
    scaffoldBackgroundColor: ColorConfig.whiteColor,
  );

  static final darkTheme = ThemeData.dark().copyWith(
    appBarTheme: AppBarTheme(
      systemOverlayStyle: const SystemUiOverlayStyle(
        statusBarColor: Colors.transparent,
        statusBarIconBrightness: Brightness.light,
        statusBarBrightness: Brightness.dark,
      ),
      titleTextStyle: TextStyleConfig.boldTextStyle(
        fontSize: DimenConfig.textSize_22,
        color: ColorConfig.whiteColor,
      ),
      iconTheme: const IconThemeData(
        color: ColorConfig.whiteColor,
      ),
    ),
    scaffoldBackgroundColor: ColorConfig.darkCharcoalColor,
  );
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.16.0, on macOS 14.1.1 23B81 darwin-arm64, locale en-US)
    • Flutter version 3.16.0 on channel stable at /Users/dev/Desktop/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision db7ef5bf9f (3 days ago), 2023-11-15 11:25:44 -0800
    • Engine revision 74d16627b9
    • Dart version 3.2.0
    • DevTools version 2.28.2
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] Connected device (3 available)
[✓] Network resources

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineflutter/engine related. See also e: labels.found in release: 3.16Found to occur in 3.16platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer versionteam-iosOwned by iOS platform teamwaiting for customer responseThe Flutter team cannot make further progress on this issue until the original reporter responds

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions