SystemUiOverlayStyle, add two examples and improve documentation#122187
Conversation
There was a problem hiding this comment.
In both of these, do you feel it is worth mentioning whether one will override the other? If a developer uses both with different colors for example, what happens to the status bar?
There was a problem hiding this comment.
It's a good point but there are several possible combinations (depending on where the AnnotatedRegion is placed). Existing AppBar.setSystemUIOverlayStyle documentation avoid this question by stating: "Apps should not enclose an AppBar with their own [AnnotatedRegion]" (this is above the see also section I updated).
There was a problem hiding this comment.
| // Flutter code sample for [SystemChrome.setSystemUIOverlayStyle]. | |
| // Flutter code sample for [AppBar.systemOverlayStyle]. |
There was a problem hiding this comment.
| void main() => runApp(const SystemOverlayStyleApp()); | |
| // Flutter code sample for setting the [SystemUiOverlayStyle] with an [AnnotatedRegion]. | |
| void main() => runApp(const SystemOverlayStyleApp()); |
There was a problem hiding this comment.
Did you mean to replace the comment on line 5 with this new one?
There was a problem hiding this comment.
For the moment, I updated the PR and put this comment on line 5.
There was a problem hiding this comment.
Oh yes that is what I meant, sorry. Thanks!
42881dd to
293f50e
Compare
…#122187) SystemUiOverlayStyle, add two examples and improve documentation

Description
This PR updates some
SystemUiOverlayStylerelated documentation and adds two examples to demonstrate declarative alternatives forSystemChrome.setSystemUIOverlayStyle.Related Issue
Fixes #24893.
Tests
Adds 2 tests, one for each new example.