-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Use AppBar.systemOverlayStyle to style system navigation bar #104827
Use AppBar.systemOverlayStyle to style system navigation bar #104827
Conversation
Would be nice if this could merged. |
Would still be nice to get this reviewed and merged, ping @darrenaustin @HansMuller 😄 |
336fe1a
to
3e80fc9
Compare
@bleroux I just want to let you know that I'm still looking at this. There seem to be a lot of issues regarding the system navigation bar. I'm wondering if I could get your help gathering all of those issues into one place so that we can see what issues people are having and whether or not these changes are the best solution for a majority of cases. Feel free to message me on Discord (a-wallen) |
@a-wallen My first take is that several issues are related to different Android SDK versions and also Android My second take is that Flutter gives two options to configure the system navigation bar:
My PR targets the declarative way and it could be considered as a developer experience improvement. Rydmike described this in a very thorough comment: #100027 (comment). As a starting point, I classified several issues I found using this two categories (imperative vs declarative): Imperative
Declarative
|
@bleroux I'm going to follow up on your comment, but before I do I think that we should make an issue called |
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.
I'm up to speed now, but still not sure that we want this change. For the most part things seem to be working as intended, but are poorly documented.
} | ||
|
||
// If both are not null, the upper provides the status bar properties and the lower provides | ||
// the system navigation bar properties. |
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.
Readability: Could you provide a brief explanation for why we do this?
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.
Readability: Could you provide a brief explanation for why we do this?
Sorry, do you mean by updating this comment in view.dart
or by commenting here on Github?
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.
I think here in view.dart
, although the comments explaining top
and bottom
above are helpful. Maybe just providing an example of why there would be more than one, an upper and a lower?
@@ -558,7 +558,8 @@ class SystemChrome { | |||
/// it can be hit-tested by the framework. On every frame, the framework will | |||
/// hit-test and select the annotated region it finds under the status and | |||
/// navigation bar and synthesize them into a single style. This can be used | |||
/// to configure the system styles when an app bar is not used. | |||
/// to configure the system styles when an app bar is not used. When an app | |||
/// bar is used an annotated region is automatically created. |
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.
Explain the combinations behind this. What happens when I set the system style and there's an AppBar.
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.
+1
IMHO, while improving the documentation will help, it won't make the API less "frustrating" as describe in this comment. The same comment from @rydmike also explains why it could make sense to argue against this change (but also why this change would be preferable 😄 ) : I fully agree that "updating the code" vs "updating the documentation" is a valid concern. So before pursuing work on this PR, a decision should be taken. |
Yes, the api is frustrating! If it were me, I would want this change, but my opinion doesn't scale to the MANY users that we have 😅. I asked for a second review by @Piinks during our triage meeting yesterday, she might have better insight. Hopefully we can move things forward that way. And, I agree that you should not put in effort until we've made a decision about this change. |
@@ -112,6 +112,11 @@ class RenderView extends RenderObject with RenderObjectWithChildMixin<RenderBox> | |||
/// and the hit-test result from the bottom of the screen provides the system | |||
/// nav bar settings. | |||
/// | |||
/// If there is no AnnotatedRegionLayer on the bottom, the hit-test result |
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.
Nit: breadcrumb
/// If there is no AnnotatedRegionLayer on the bottom, the hit-test result | |
/// If there is no [AnnotatedRegionLayer] on the bottom, the hit-test result |
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.
Done
return style.copyWith(statusBarColor: backgroundColor); | ||
// For backward compatibility, create an overlay style without system navigation bar settings. | ||
return SystemUiOverlayStyle( | ||
statusBarColor: style.statusBarColor, |
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.
Would we not want to honor backgroundColor anymore?
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.
Good catch! If we pursue work on this PR, I will also try to find why this bug does not break any tests.
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.
I fixed this bug and I added a test as there was no existing test covering this (it is somewhat new because the 'backgroundColor' parameter is non-null only when using Material 3).
Thanks a lot for spotting this!
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.
As far as I know, the AppBar intentionally only applies to the status bar (and not the navigation bar) because the AppBar renders into the status bar area. I think the intention is that since the user can set the AppBar to be any color, it will set the status bar overlay style to avoid the status bar time, date etc from being obscured.
Assuming the same style should be applied to the navigation bar gives me pause. There may not be a navigation bar, or the user may be using edge to edge. This could result in the navigation buttons not being visible to the user.
Hey @Piinks!
Maybe I misread your comment, but this PR only aims to apply For the moment, we get issues filed by users who tried code similar to : appBar: AppBar(
systemOverlayStyle: SystemUiOverlayStyle.light.copyWith(
systemNavigationBarColor: Colors.green, // ignored
),
), As those properties are ignored it leads to frustration (users assume it should work because those properties are documented in If This PR aims to apply those properties without introducing a breaking change and without overriding the values set in a bottom I wrote this PR some months ago, maybe there are bugs in it (you already find one 😄) or maybe the code is not aligned with the goal I had in mind, but before pursuing work, we (@a-wallen and I) reached the conclusion that a decision should be made on agreeing or not that the goal of this PR is a valid concern. |
Hey @bleroux thank you for the additional context! I think this change is ok to make (modulo that one bug 😉 ), we should double check that it is not breaking though. If you would, can you fix the background color, then I'll run this through some extra testing internally to see if anything breaks. 👍 |
3e80fc9
to
26b153c
Compare
@Piinks Great!
🤞 🤞 😄 |
Tests are running, will circle back with results. |
Tests passed! |
26b153c
to
f3fb10f
Compare
f3fb10f
to
73e8cb2
Compare
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.
* 5280135 ecd3c4857 Roll Fuchsia Mac SDK from sNXsQVxntMX8f42LE... to 9Jb1-3tRPQ2ZhpTQC... (flutter/engine#37363) (flutter/flutter#114772) * a6da104 Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (flutter/flutter#114560) * 19c5fc5 0cbdf464c Add Matrix::LookAt (flutter/engine#37361) (flutter/flutter#114786) * c551fe3 4e45cfb4a Roll Fuchsia Mac SDK from 9Jb1-3tRPQ2ZhpTQC... to 5XOj9l5e2wkSpMKT1... (flutter/engine#37369) (flutter/flutter#114789) * a54a46d 6b57fddd1 Bump github/codeql-action from 2.1.29 to 2.1.31 (flutter/engine#37374) (flutter/flutter#114798) * 3c9288c Increase minimum supported macOS version from 10.13 to 10.14 (flutter/flutter#114713) * a1289a4 891d4a357 Roll Skia from c3c31be8729b to 513f0fd34590 (2 revisions) (flutter/engine#37377) (flutter/flutter#114802) * 04d6fd2 Roll Plugins from a279b9d to 3ca3410 (4 revisions) (flutter/flutter#114813) * 151c831 92d9ad27f Roll Skia from 513f0fd34590 to da9fad017aee (2 revisions) (flutter/engine#37379) (flutter/flutter#114816) * d6a8e92 Revert "Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (#114560)" (flutter/flutter#114819) * 7de60bb 334549704 Roll buildroot to d13d64086f5e301bd0415eede895b34af220ef42 (flutter/engine#37380) (flutter/flutter#114821) * 496cf62 Delegate TestWindow.updateSemantics to the wrapped SingletonFlutterWindow (flutter/flutter#114733) * 497a528 Fix TextField/CupertinoTextField hint style overflow not work. (flutter/flutter#114335) * 7e36cf1 Mac Page Up / Page Down in text fields (flutter/flutter#105497) * 77c06c2 0075e10bc Move gclient var property to ci.yaml (flutter/engine#37351) (flutter/flutter#114828) * 378387b when getting xcworkspace, exclude hidden files (flutter/flutter#114099) * e901832 4e03d059d [Android] Speed up the method 'FlutterRenderer.getBitmap' (flutter/engine#37342) (flutter/flutter#114833) * 3cde69e Revert "Revert "Scribble mixin (#104128)" (#114647)" (flutter/flutter#114698) * e1adc96 feat: provide a way to set the initial child's alignment (flutter/flutter#114745) * fe5eb2d ee48c0392 Roll Fuchsia Mac SDK from 5XOj9l5e2wkSpMKT1... to sa5bVGimNo3JwLV27... (flutter/engine#37386) (flutter/flutter#114836) * 5628ebf [RawKeyboard] Allow inconsistent modifiers for Web (flutter/flutter#114499) * f1cdfa2 Use AppBar.systemOverlayStyle to style system navigation bar (flutter/flutter#104827) * e4e902d [flutter_tools] add compilation failure tests for new cases added in impellerc (flutter/flutter#114757) * 7640f31 a81a715ce Revert "Remove deprecated calls to updateSemantics in `PlatformDispatcher` (#36673)" (flutter/engine#37388) (flutter/flutter#114842) * 585d445 Roll Flutter Engine from a81a715ce6b2 to df602070ac4b (3 revisions) (flutter/flutter#114847) * 1ca2e0b Fix `CastError` in `StadiumBorder.lerpTo` and `StadiumBorder.lerpFrom` when using `BorderRadiusDirectional` (flutter/flutter#114826) * 2e85e74 004a30516 [fuchsia] embedding-flutter test (flutter/engine#37052) (flutter/flutter#114854) * 139b8f4 Roll Flutter Engine from 004a305166d5 to e7d7edab98ad (2 revisions) (flutter/flutter#114855) * 53e6876 Allow Flutter golden file tests to be flaky (flutter/flutter#114450) * a1432a9 Refactor fix_data.yaml (flutter/flutter#114192)
* 04d6fd2 Roll Plugins from a279b9d to 3ca3410 (4 revisions) (flutter/flutter#114813) * 151c831 92d9ad27f Roll Skia from 513f0fd34590 to da9fad017aee (2 revisions) (flutter/engine#37379) (flutter/flutter#114816) * d6a8e92 Revert "Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (#114560)" (flutter/flutter#114819) * 7de60bb 334549704 Roll buildroot to d13d64086f5e301bd0415eede895b34af220ef42 (flutter/engine#37380) (flutter/flutter#114821) * 496cf62 Delegate TestWindow.updateSemantics to the wrapped SingletonFlutterWindow (flutter/flutter#114733) * 497a528 Fix TextField/CupertinoTextField hint style overflow not work. (flutter/flutter#114335) * 7e36cf1 Mac Page Up / Page Down in text fields (flutter/flutter#105497) * 77c06c2 0075e10bc Move gclient var property to ci.yaml (flutter/engine#37351) (flutter/flutter#114828) * 378387b when getting xcworkspace, exclude hidden files (flutter/flutter#114099) * e901832 4e03d059d [Android] Speed up the method 'FlutterRenderer.getBitmap' (flutter/engine#37342) (flutter/flutter#114833) * 3cde69e Revert "Revert "Scribble mixin (#104128)" (#114647)" (flutter/flutter#114698) * e1adc96 feat: provide a way to set the initial child's alignment (flutter/flutter#114745) * fe5eb2d ee48c0392 Roll Fuchsia Mac SDK from 5XOj9l5e2wkSpMKT1... to sa5bVGimNo3JwLV27... (flutter/engine#37386) (flutter/flutter#114836) * 5628ebf [RawKeyboard] Allow inconsistent modifiers for Web (flutter/flutter#114499) * f1cdfa2 Use AppBar.systemOverlayStyle to style system navigation bar (flutter/flutter#104827) * e4e902d [flutter_tools] add compilation failure tests for new cases added in impellerc (flutter/flutter#114757) * 7640f31 a81a715ce Revert "Remove deprecated calls to updateSemantics in `PlatformDispatcher` (#36673)" (flutter/engine#37388) (flutter/flutter#114842) * 585d445 Roll Flutter Engine from a81a715ce6b2 to df602070ac4b (3 revisions) (flutter/flutter#114847) * 1ca2e0b Fix `CastError` in `StadiumBorder.lerpTo` and `StadiumBorder.lerpFrom` when using `BorderRadiusDirectional` (flutter/flutter#114826) * 2e85e74 004a30516 [fuchsia] embedding-flutter test (flutter/engine#37052) (flutter/flutter#114854) * 139b8f4 Roll Flutter Engine from 004a305166d5 to e7d7edab98ad (2 revisions) (flutter/flutter#114855) * 53e6876 Allow Flutter golden file tests to be flaky (flutter/flutter#114450) * a1432a9 Refactor fix_data.yaml (flutter/flutter#114192)
* 04d6fd2 Roll Plugins from a279b9d to 3ca3410 (4 revisions) (flutter/flutter#114813) * 151c831 92d9ad27f Roll Skia from 513f0fd34590 to da9fad017aee (2 revisions) (flutter/engine#37379) (flutter/flutter#114816) * d6a8e92 Revert "Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (#114560)" (flutter/flutter#114819) * 7de60bb 334549704 Roll buildroot to d13d64086f5e301bd0415eede895b34af220ef42 (flutter/engine#37380) (flutter/flutter#114821) * 496cf62 Delegate TestWindow.updateSemantics to the wrapped SingletonFlutterWindow (flutter/flutter#114733) * 497a528 Fix TextField/CupertinoTextField hint style overflow not work. (flutter/flutter#114335) * 7e36cf1 Mac Page Up / Page Down in text fields (flutter/flutter#105497) * 77c06c2 0075e10bc Move gclient var property to ci.yaml (flutter/engine#37351) (flutter/flutter#114828) * 378387b when getting xcworkspace, exclude hidden files (flutter/flutter#114099) * e901832 4e03d059d [Android] Speed up the method 'FlutterRenderer.getBitmap' (flutter/engine#37342) (flutter/flutter#114833) * 3cde69e Revert "Revert "Scribble mixin (#104128)" (#114647)" (flutter/flutter#114698) * e1adc96 feat: provide a way to set the initial child's alignment (flutter/flutter#114745) * fe5eb2d ee48c0392 Roll Fuchsia Mac SDK from 5XOj9l5e2wkSpMKT1... to sa5bVGimNo3JwLV27... (flutter/engine#37386) (flutter/flutter#114836) * 5628ebf [RawKeyboard] Allow inconsistent modifiers for Web (flutter/flutter#114499) * f1cdfa2 Use AppBar.systemOverlayStyle to style system navigation bar (flutter/flutter#104827) * e4e902d [flutter_tools] add compilation failure tests for new cases added in impellerc (flutter/flutter#114757) * 7640f31 a81a715ce Revert "Remove deprecated calls to updateSemantics in `PlatformDispatcher` (#36673)" (flutter/engine#37388) (flutter/flutter#114842) * 585d445 Roll Flutter Engine from a81a715ce6b2 to df602070ac4b (3 revisions) (flutter/flutter#114847) * 1ca2e0b Fix `CastError` in `StadiumBorder.lerpTo` and `StadiumBorder.lerpFrom` when using `BorderRadiusDirectional` (flutter/flutter#114826) * 2e85e74 004a30516 [fuchsia] embedding-flutter test (flutter/engine#37052) (flutter/flutter#114854) * 139b8f4 Roll Flutter Engine from 004a305166d5 to e7d7edab98ad (2 revisions) (flutter/flutter#114855) * 53e6876 Allow Flutter golden file tests to be flaky (flutter/flutter#114450) * a1432a9 Refactor fix_data.yaml (flutter/flutter#114192)
* 5280135 ecd3c4857 Roll Fuchsia Mac SDK from sNXsQVxntMX8f42LE... to 9Jb1-3tRPQ2ZhpTQC... (flutter/engine#37363) (flutter/flutter#114772) * a6da104 Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (flutter/flutter#114560) * 19c5fc5 0cbdf464c Add Matrix::LookAt (flutter/engine#37361) (flutter/flutter#114786) * c551fe3 4e45cfb4a Roll Fuchsia Mac SDK from 9Jb1-3tRPQ2ZhpTQC... to 5XOj9l5e2wkSpMKT1... (flutter/engine#37369) (flutter/flutter#114789) * a54a46d 6b57fddd1 Bump github/codeql-action from 2.1.29 to 2.1.31 (flutter/engine#37374) (flutter/flutter#114798) * 3c9288c Increase minimum supported macOS version from 10.13 to 10.14 (flutter/flutter#114713) * a1289a4 891d4a357 Roll Skia from c3c31be8729b to 513f0fd34590 (2 revisions) (flutter/engine#37377) (flutter/flutter#114802) * 04d6fd2 Roll Plugins from a279b9d to 3ca3410 (4 revisions) (flutter/flutter#114813) * 151c831 92d9ad27f Roll Skia from 513f0fd34590 to da9fad017aee (2 revisions) (flutter/engine#37379) (flutter/flutter#114816) * d6a8e92 Revert "Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (#114560)" (flutter/flutter#114819) * 7de60bb 334549704 Roll buildroot to d13d64086f5e301bd0415eede895b34af220ef42 (flutter/engine#37380) (flutter/flutter#114821) * 496cf62 Delegate TestWindow.updateSemantics to the wrapped SingletonFlutterWindow (flutter/flutter#114733) * 497a528 Fix TextField/CupertinoTextField hint style overflow not work. (flutter/flutter#114335) * 7e36cf1 Mac Page Up / Page Down in text fields (flutter/flutter#105497) * 77c06c2 0075e10bc Move gclient var property to ci.yaml (flutter/engine#37351) (flutter/flutter#114828) * 378387b when getting xcworkspace, exclude hidden files (flutter/flutter#114099) * e901832 4e03d059d [Android] Speed up the method 'FlutterRenderer.getBitmap' (flutter/engine#37342) (flutter/flutter#114833) * 3cde69e Revert "Revert "Scribble mixin (#104128)" (#114647)" (flutter/flutter#114698) * e1adc96 feat: provide a way to set the initial child's alignment (flutter/flutter#114745) * fe5eb2d ee48c0392 Roll Fuchsia Mac SDK from 5XOj9l5e2wkSpMKT1... to sa5bVGimNo3JwLV27... (flutter/engine#37386) (flutter/flutter#114836) * 5628ebf [RawKeyboard] Allow inconsistent modifiers for Web (flutter/flutter#114499) * f1cdfa2 Use AppBar.systemOverlayStyle to style system navigation bar (flutter/flutter#104827) * e4e902d [flutter_tools] add compilation failure tests for new cases added in impellerc (flutter/flutter#114757) * 7640f31 a81a715ce Revert "Remove deprecated calls to updateSemantics in `PlatformDispatcher` (#36673)" (flutter/engine#37388) (flutter/flutter#114842) * 585d445 Roll Flutter Engine from a81a715ce6b2 to df602070ac4b (3 revisions) (flutter/flutter#114847) * 1ca2e0b Fix `CastError` in `StadiumBorder.lerpTo` and `StadiumBorder.lerpFrom` when using `BorderRadiusDirectional` (flutter/flutter#114826) * 2e85e74 004a30516 [fuchsia] embedding-flutter test (flutter/engine#37052) (flutter/flutter#114854) * 139b8f4 Roll Flutter Engine from 004a305166d5 to e7d7edab98ad (2 revisions) (flutter/flutter#114855) * 53e6876 Allow Flutter golden file tests to be flaky (flutter/flutter#114450) * a1432a9 Refactor fix_data.yaml (flutter/flutter#114192)
* 04d6fd2 Roll Plugins from a279b9d to 3ca3410 (4 revisions) (flutter/flutter#114813) * 151c831 92d9ad27f Roll Skia from 513f0fd34590 to da9fad017aee (2 revisions) (flutter/engine#37379) (flutter/flutter#114816) * d6a8e92 Revert "Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (#114560)" (flutter/flutter#114819) * 7de60bb 334549704 Roll buildroot to d13d64086f5e301bd0415eede895b34af220ef42 (flutter/engine#37380) (flutter/flutter#114821) * 496cf62 Delegate TestWindow.updateSemantics to the wrapped SingletonFlutterWindow (flutter/flutter#114733) * 497a528 Fix TextField/CupertinoTextField hint style overflow not work. (flutter/flutter#114335) * 7e36cf1 Mac Page Up / Page Down in text fields (flutter/flutter#105497) * 77c06c2 0075e10bc Move gclient var property to ci.yaml (flutter/engine#37351) (flutter/flutter#114828) * 378387b when getting xcworkspace, exclude hidden files (flutter/flutter#114099) * e901832 4e03d059d [Android] Speed up the method 'FlutterRenderer.getBitmap' (flutter/engine#37342) (flutter/flutter#114833) * 3cde69e Revert "Revert "Scribble mixin (#104128)" (#114647)" (flutter/flutter#114698) * e1adc96 feat: provide a way to set the initial child's alignment (flutter/flutter#114745) * fe5eb2d ee48c0392 Roll Fuchsia Mac SDK from 5XOj9l5e2wkSpMKT1... to sa5bVGimNo3JwLV27... (flutter/engine#37386) (flutter/flutter#114836) * 5628ebf [RawKeyboard] Allow inconsistent modifiers for Web (flutter/flutter#114499) * f1cdfa2 Use AppBar.systemOverlayStyle to style system navigation bar (flutter/flutter#104827) * e4e902d [flutter_tools] add compilation failure tests for new cases added in impellerc (flutter/flutter#114757) * 7640f31 a81a715ce Revert "Remove deprecated calls to updateSemantics in `PlatformDispatcher` (#36673)" (flutter/engine#37388) (flutter/flutter#114842) * 585d445 Roll Flutter Engine from a81a715ce6b2 to df602070ac4b (3 revisions) (flutter/flutter#114847) * 1ca2e0b Fix `CastError` in `StadiumBorder.lerpTo` and `StadiumBorder.lerpFrom` when using `BorderRadiusDirectional` (flutter/flutter#114826) * 2e85e74 004a30516 [fuchsia] embedding-flutter test (flutter/engine#37052) (flutter/flutter#114854) * 139b8f4 Roll Flutter Engine from 004a305166d5 to e7d7edab98ad (2 revisions) (flutter/flutter#114855) * 53e6876 Allow Flutter golden file tests to be flaky (flutter/flutter#114450) * a1432a9 Refactor fix_data.yaml (flutter/flutter#114192)
…#104827) * Use upper AnnotatedRegion properties when no bottom one found (and vice versa) * Update comments Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
…#104827) * Use upper AnnotatedRegion properties when no bottom one found (and vice versa) * Update comments Co-authored-by: Bruno Leroux <bruno.leroux@gmail.com>
* 04d6fd2 Roll Plugins from a279b9d to 3ca3410 (4 revisions) (flutter/flutter#114813) * 151c831 92d9ad27f Roll Skia from 513f0fd34590 to da9fad017aee (2 revisions) (flutter/engine#37379) (flutter/flutter#114816) * d6a8e92 Revert "Adds support for the Material Badge widget, BadgeTheme, BadgeThemeData (#114560)" (flutter/flutter#114819) * 7de60bb 334549704 Roll buildroot to d13d64086f5e301bd0415eede895b34af220ef42 (flutter/engine#37380) (flutter/flutter#114821) * 496cf62 Delegate TestWindow.updateSemantics to the wrapped SingletonFlutterWindow (flutter/flutter#114733) * 497a528 Fix TextField/CupertinoTextField hint style overflow not work. (flutter/flutter#114335) * 7e36cf1 Mac Page Up / Page Down in text fields (flutter/flutter#105497) * 77c06c2 0075e10bc Move gclient var property to ci.yaml (flutter/engine#37351) (flutter/flutter#114828) * 378387b when getting xcworkspace, exclude hidden files (flutter/flutter#114099) * e901832 4e03d059d [Android] Speed up the method 'FlutterRenderer.getBitmap' (flutter/engine#37342) (flutter/flutter#114833) * 3cde69e Revert "Revert "Scribble mixin (#104128)" (#114647)" (flutter/flutter#114698) * e1adc96 feat: provide a way to set the initial child's alignment (flutter/flutter#114745) * fe5eb2d ee48c0392 Roll Fuchsia Mac SDK from 5XOj9l5e2wkSpMKT1... to sa5bVGimNo3JwLV27... (flutter/engine#37386) (flutter/flutter#114836) * 5628ebf [RawKeyboard] Allow inconsistent modifiers for Web (flutter/flutter#114499) * f1cdfa2 Use AppBar.systemOverlayStyle to style system navigation bar (flutter/flutter#104827) * e4e902d [flutter_tools] add compilation failure tests for new cases added in impellerc (flutter/flutter#114757) * 7640f31 a81a715ce Revert "Remove deprecated calls to updateSemantics in `PlatformDispatcher` (#36673)" (flutter/engine#37388) (flutter/flutter#114842) * 585d445 Roll Flutter Engine from a81a715ce6b2 to df602070ac4b (3 revisions) (flutter/flutter#114847) * 1ca2e0b Fix `CastError` in `StadiumBorder.lerpTo` and `StadiumBorder.lerpFrom` when using `BorderRadiusDirectional` (flutter/flutter#114826) * 2e85e74 004a30516 [fuchsia] embedding-flutter test (flutter/engine#37052) (flutter/flutter#114854) * 139b8f4 Roll Flutter Engine from 004a305166d5 to e7d7edab98ad (2 revisions) (flutter/flutter#114855) * 53e6876 Allow Flutter golden file tests to be flaky (flutter/flutter#114450) * a1432a9 Refactor fix_data.yaml (flutter/flutter#114192)
Description
AppBar.systemOverlayStyle
exposes properties to set system navigation bar style.Those properties are not applied because the
AnnotatedRegion
created by an AppBar is on the top of the screen and RenderView does not use the annotated region on the top to style the system navigation bar.To set the system navigation bar style, Flutter developers should create a second AnnotatedRegion on the bottom of the screen. This is not intuitive as system navigation properties are available when setting
AppBar.systemOverlayStyle
and this is not convenient, as explained in this comment.This PR updates how
RenderView
creates a system overlay style.Before, it looked up for a top annotated region to style the status bar and a bottom annotated region to style the system navigation bar.
After, if only one of the top or the bottom annotated region is found, it will be used to style the status bar and the system navigation bar. If both are found, it will work as before.
Related Issue
Fixes #104410
Tests
Adds 1 test in material/app_bar_test.dart
Adds 3 tests in rendering/view_chrome_style_test.dart