Commit de023bc6 authored by Tan Jay Jun's avatar Tan Jay Jun Committed by xster

Improve SystemChrome documentation (#14181)

parent 7c2fe34f
...@@ -157,8 +157,23 @@ class SystemChrome { ...@@ -157,8 +157,23 @@ class SystemChrome {
/// system UI styles. For instance, to change the system UI style on a new /// system UI styles. For instance, to change the system UI style on a new
/// page, consider calling when pushing/popping a new [PageRoute]. /// page, consider calling when pushing/popping a new [PageRoute].
/// ///
/// However, the [AppBar] widget automatically sets the system overlay style
/// based on its [AppBar.brightness], so configure that instead of calling
/// this method directly. Likewise, do the same for [CupertinoNavigationBar]
/// via [CupertinoNavigationBar.backgroundColor].
///
/// If a particular style is not supported on the platform, selecting it will /// If a particular style is not supported on the platform, selecting it will
/// have no effect. /// have no effect.
///
/// ## Sample Code
///
/// ```dart
/// @override
/// Widget build(BuildContext context) {
/// SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.dark);
/// return /* ... */;
/// }
/// ```
static void setSystemUIOverlayStyle(SystemUiOverlayStyle style) { static void setSystemUIOverlayStyle(SystemUiOverlayStyle style) {
assert(style != null); assert(style != null);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment