Fix system chrome colors on gallery and definition in iOS (#18735)
This commit is contained in:
@@ -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<ContactsDemo> {
|
||||
),
|
||||
new SliverList(
|
||||
delegate: new SliverChildListDelegate(<Widget>[
|
||||
new _ContactCategory(
|
||||
icon: Icons.call,
|
||||
children: <Widget>[
|
||||
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 <String>[
|
||||
'(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 <String>[
|
||||
'(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 <String>[
|
||||
'(650) 555-6789',
|
||||
'Home',
|
||||
],
|
||||
),
|
||||
],
|
||||
new AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
value: SystemUiOverlayStyle.light,
|
||||
child: new _ContactCategory(
|
||||
icon: Icons.call,
|
||||
children: <Widget>[
|
||||
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 <String>[
|
||||
'(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 <String>[
|
||||
'(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 <String>[
|
||||
'(650) 555-6789',
|
||||
'Home',
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
new _ContactCategory(
|
||||
icon: Icons.contact_mail,
|
||||
|
||||
@@ -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<GalleryHome> with SingleTickerProviderStat
|
||||
]
|
||||
);
|
||||
}
|
||||
home = new AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
child: home,
|
||||
value: SystemUiOverlayStyle.dark
|
||||
);
|
||||
|
||||
return home;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user