Unverified Commit d6465c47 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Fix system chrome colors on gallery and definition in iOS (#18735)

parent daa16199
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class _ContactCategory extends StatelessWidget { class _ContactCategory extends StatelessWidget {
const _ContactCategory({ Key key, this.icon, this.children }) : super(key: key); const _ContactCategory({ Key key, this.icon, this.children }) : super(key: key);
...@@ -182,7 +183,9 @@ class ContactsDemoState extends State<ContactsDemo> { ...@@ -182,7 +183,9 @@ class ContactsDemoState extends State<ContactsDemo> {
), ),
new SliverList( new SliverList(
delegate: new SliverChildListDelegate(<Widget>[ delegate: new SliverChildListDelegate(<Widget>[
new _ContactCategory( new AnnotatedRegion<SystemUiOverlayStyle>(
value: SystemUiOverlayStyle.light,
child: new _ContactCategory(
icon: Icons.call, icon: Icons.call,
children: <Widget>[ children: <Widget>[
new _ContactItem( new _ContactItem(
...@@ -226,6 +229,7 @@ class ContactsDemoState extends State<ContactsDemo> { ...@@ -226,6 +229,7 @@ class ContactsDemoState extends State<ContactsDemo> {
), ),
], ],
), ),
),
new _ContactCategory( new _ContactCategory(
icon: Icons.contact_mail, icon: Icons.contact_mail,
children: <Widget>[ children: <Widget>[
......
...@@ -7,6 +7,7 @@ import 'dart:developer'; ...@@ -7,6 +7,7 @@ import 'dart:developer';
import 'dart:math' as math; import 'dart:math' as math;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'backdrop.dart'; import 'backdrop.dart';
import 'demos.dart'; import 'demos.dart';
...@@ -399,6 +400,10 @@ class _GalleryHomeState extends State<GalleryHome> with SingleTickerProviderStat ...@@ -399,6 +400,10 @@ class _GalleryHomeState extends State<GalleryHome> with SingleTickerProviderStat
] ]
); );
} }
home = new AnnotatedRegion<SystemUiOverlayStyle>(
child: home,
value: SystemUiOverlayStyle.dark
);
return home; return home;
} }
......
...@@ -105,7 +105,7 @@ class SystemUiOverlayStyle { ...@@ -105,7 +105,7 @@ class SystemUiOverlayStyle {
statusBarColor: null, statusBarColor: null,
systemNavigationBarIconBrightness: Brightness.dark, systemNavigationBarIconBrightness: Brightness.dark,
statusBarIconBrightness: Brightness.dark, statusBarIconBrightness: Brightness.dark,
statusBarBrightness: Brightness.dark, statusBarBrightness: Brightness.light,
); );
/// System overlays should be drawn with a dark color. Intended for /// System overlays should be drawn with a dark color. Intended for
...@@ -116,7 +116,7 @@ class SystemUiOverlayStyle { ...@@ -116,7 +116,7 @@ class SystemUiOverlayStyle {
statusBarColor: null, statusBarColor: null,
systemNavigationBarIconBrightness: Brightness.light, systemNavigationBarIconBrightness: Brightness.light,
statusBarIconBrightness: Brightness.light, statusBarIconBrightness: Brightness.light,
statusBarBrightness: Brightness.light, statusBarBrightness: Brightness.dark,
); );
/// Creates a new [SystemUiOverlayStyle]. /// Creates a new [SystemUiOverlayStyle].
...@@ -151,7 +151,7 @@ class SystemUiOverlayStyle { ...@@ -151,7 +151,7 @@ class SystemUiOverlayStyle {
/// The brightness of top status bar. /// The brightness of top status bar.
/// ///
/// Only honored in iOS . /// Only honored in iOS.
final Brightness statusBarBrightness; final Brightness statusBarBrightness;
/// The brightness of the top status bar icons. /// The brightness of the top status bar icons.
......
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