You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
systemNavigationBarIconBrightness: Brightness.dark resets to light onResume. #21265
changed the title [-]systemNavigationBarIconBrightness: Brightness.dark resets to light onResum.[/-][+]systemNavigationBarIconBrightness: Brightness.dark resets to light onResume.[/+]on Aug 31, 2018
Reacted by Carlos Eugenio Torres, Amine, Steve Gehrman, Xgamefactory, Nero Song, Alex Melnikov, Joseph García, Rory Coulson, Ian Spryn, postpasspost and 2 more
Relying on an AnnotatedRegion is the right solution (SystemChrome.setSystemUIOverlayStyle is an imperative API that might have to be called again, for instance after resuming the app).
FYI, an AppBar automatically inserts an AnnotatedRegion and since #104827 is merged, AppBar.systemOverlayStyle can be used to style both the status bar and the system navigation bar.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[-]systemNavigationBarIconBrightness: Brightness.dark resets to light onResum.[/-][+]systemNavigationBarIconBrightness: Brightness.dark resets to light onResume.[/+]zoechi commentedon Aug 31, 2018
Please add the output of
flutter doctor -v.Looks like a part is missing from the fix to #4630
iamarnas commentedon Aug 31, 2018
@zoechi Here is my output of
flutter doctor -vflutter doctor -v
[✓] Flutter (Channel master, v0.7.4-pre.21, on Mac OS X 10.13.6 17G65, locale sv-SE) • Flutter version 0.7.4-pre.21 at /Users/arnas/development/tools/flutter • Framework revision 7cebaac985 (28 hours ago), 2018-08-29 21:53:39 -0700 • Engine revision 252da48082 • Dart version 2.1.0-dev.3.0.flutter-760a9690c2 [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) • Android SDK at /Users/arnas/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-P, build-tools 27.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01) • All Android licenses accepted. [✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.4.1, Build version 9F2000 • ios-deploy 1.9.2 • CocoaPods version 1.5.3 [✓] Android Studio (version 3.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 27.1.1 • Dart plugin version 173.4700 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01) [✓] VS Code (version 1.26.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 2.17.1 [✓] Connected devices (1 available) • Nexus 5X • 013c535795c613eb • android-arm64 • Android 8.1.0 (API 27) • No issues found!tomosullivan8 commentedon May 5, 2019
This constantly happens to me too, everytime the app is re-opened (not the initial open) - has there been a fix for this?
Only resets the systemNavigationBarIconBrightness, everything else stays as expected.
PiN73 commentedon Jun 8, 2019
Listening
AppLifecycleState.resumedwithSystemChannels.lifecycle.setMessageHandlerdidn't work for me.It seems
AnnotatedRegioncan help:sgehrman commentedon Jan 9, 2020
PiN73 commentedon Jan 9, 2020
@sgehrman why is AnnotatedRegion bad?
Xgamefactory commentedon Jan 28, 2020
Thanks for AnnotatedRegion.
But if you use AppBar it will totally override systemUiStyle
app_bar.dart line 588
we have edited app_bar.dart by removing AnnotatedRegion not a clean solution but
iamarnas commentedon Jan 28, 2020
Just override you AppBar ThemeData with copywith().
Xgamefactory commentedon Jan 29, 2020
There is a brigthness parameter for appbar but We have custom statusbar and navigation bar coloring not just dark light .
9 remaining items
Fixed systemNavigationBarIconBrightness flutter/flutter#21265
thang510023 commentedon May 31, 2021
it worked for me
Stitch-Taotao commentedon Jan 20, 2022
AnnotatedRegion(value: SystemUiOverlayStyle.dark,child: xxx,); not work in Flutter 2.8.1 on Device run in MiUi
But the same code work in Flutter 2.5.1 in MiUi
shadyshrif commentedon Mar 28, 2022
This was really helpful, but in my case I was using statusBar related customization also.
which didn't work with the
AnnotatedRegionso my solution was like that
olegyablokov commentedon Apr 28, 2022
I have tried the solutions described here, nothing has helped yet.
bleroux commentedon Jan 27, 2023
Relying on an
AnnotatedRegionis the right solution (SystemChrome.setSystemUIOverlayStyleis an imperative API that might have to be called again, for instance after resuming the app).FYI, an
AppBarautomatically inserts anAnnotatedRegionand since #104827 is merged,AppBar.systemOverlayStylecan be used to style both the status bar and the system navigation bar.github-actions commentedon Mar 3, 2023
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.