diff --git a/examples/flutter_gallery/lib/demo/contacts_demo.dart b/examples/flutter_gallery/lib/demo/contacts_demo.dart index 0d2c488697..34f47207a3 100644 --- a/examples/flutter_gallery/lib/demo/contacts_demo.dart +++ b/examples/flutter_gallery/lib/demo/contacts_demo.dart @@ -3,6 +3,7 @@ // found in the LICENSE file. import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; class _ContactCategory extends StatelessWidget { const _ContactCategory({ Key key, this.icon, this.children }) : super(key: key); @@ -182,49 +183,52 @@ class ContactsDemoState extends State { ), new SliverList( delegate: new SliverChildListDelegate([ - new _ContactCategory( - icon: Icons.call, - children: [ - new _ContactItem( - icon: Icons.message, - tooltip: 'Send message', - onPressed: () { - _scaffoldKey.currentState.showSnackBar(const SnackBar( - content: const Text('Pretend that this opened your SMS application.') - )); - }, - lines: const [ - '(650) 555-1234', - 'Mobile', - ], - ), - new _ContactItem( - icon: Icons.message, - tooltip: 'Send message', - onPressed: () { - _scaffoldKey.currentState.showSnackBar(const SnackBar( - content: const Text('A messaging app appears.') - )); - }, - lines: const [ - '(323) 555-6789', - 'Work', - ], - ), - new _ContactItem( - icon: Icons.message, - tooltip: 'Send message', - onPressed: () { - _scaffoldKey.currentState.showSnackBar(const SnackBar( - content: const Text('Imagine if you will, a messaging application.') - )); - }, - lines: const [ - '(650) 555-6789', - 'Home', - ], - ), - ], + new AnnotatedRegion( + value: SystemUiOverlayStyle.light, + child: new _ContactCategory( + icon: Icons.call, + children: [ + new _ContactItem( + icon: Icons.message, + tooltip: 'Send message', + onPressed: () { + _scaffoldKey.currentState.showSnackBar(const SnackBar( + content: const Text('Pretend that this opened your SMS application.') + )); + }, + lines: const [ + '(650) 555-1234', + 'Mobile', + ], + ), + new _ContactItem( + icon: Icons.message, + tooltip: 'Send message', + onPressed: () { + _scaffoldKey.currentState.showSnackBar(const SnackBar( + content: const Text('A messaging app appears.') + )); + }, + lines: const [ + '(323) 555-6789', + 'Work', + ], + ), + new _ContactItem( + icon: Icons.message, + tooltip: 'Send message', + onPressed: () { + _scaffoldKey.currentState.showSnackBar(const SnackBar( + content: const Text('Imagine if you will, a messaging application.') + )); + }, + lines: const [ + '(650) 555-6789', + 'Home', + ], + ), + ], + ), ), new _ContactCategory( icon: Icons.contact_mail, diff --git a/examples/flutter_gallery/lib/gallery/home.dart b/examples/flutter_gallery/lib/gallery/home.dart index 2c7e1ec70b..b11761cd31 100644 --- a/examples/flutter_gallery/lib/gallery/home.dart +++ b/examples/flutter_gallery/lib/gallery/home.dart @@ -7,6 +7,7 @@ import 'dart:developer'; import 'dart:math' as math; import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; import 'backdrop.dart'; import 'demos.dart'; @@ -399,6 +400,10 @@ class _GalleryHomeState extends State with SingleTickerProviderStat ] ); } + home = new AnnotatedRegion( + child: home, + value: SystemUiOverlayStyle.dark + ); return home; } diff --git a/packages/flutter/lib/src/services/system_chrome.dart b/packages/flutter/lib/src/services/system_chrome.dart index 0c9f864f66..344afbd4bd 100644 --- a/packages/flutter/lib/src/services/system_chrome.dart +++ b/packages/flutter/lib/src/services/system_chrome.dart @@ -105,7 +105,7 @@ class SystemUiOverlayStyle { statusBarColor: null, systemNavigationBarIconBrightness: Brightness.dark, statusBarIconBrightness: Brightness.dark, - statusBarBrightness: Brightness.dark, + statusBarBrightness: Brightness.light, ); /// System overlays should be drawn with a dark color. Intended for @@ -116,7 +116,7 @@ class SystemUiOverlayStyle { statusBarColor: null, systemNavigationBarIconBrightness: Brightness.light, statusBarIconBrightness: Brightness.light, - statusBarBrightness: Brightness.light, + statusBarBrightness: Brightness.dark, ); /// Creates a new [SystemUiOverlayStyle]. @@ -151,7 +151,7 @@ class SystemUiOverlayStyle { /// The brightness of top status bar. /// - /// Only honored in iOS . + /// Only honored in iOS. final Brightness statusBarBrightness; /// The brightness of the top status bar icons.