Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d6465c47
Unverified
Commit
d6465c47
authored
Jun 22, 2018
by
Jonah Williams
Committed by
GitHub
Jun 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix system chrome colors on gallery and definition in iOS (#18735)
parent
daa16199
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
46 deletions
+55
-46
contacts_demo.dart
examples/flutter_gallery/lib/demo/contacts_demo.dart
+47
-43
home.dart
examples/flutter_gallery/lib/gallery/home.dart
+5
-0
system_chrome.dart
packages/flutter/lib/src/services/system_chrome.dart
+3
-3
No files found.
examples/flutter_gallery/lib/demo/contacts_demo.dart
View file @
d6465c47
...
@@ -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,49 +183,52 @@ class ContactsDemoState extends State<ContactsDemo> {
...
@@ -182,49 +183,52 @@ class ContactsDemoState extends State<ContactsDemo> {
),
),
new
SliverList
(
new
SliverList
(
delegate:
new
SliverChildListDelegate
(<
Widget
>[
delegate:
new
SliverChildListDelegate
(<
Widget
>[
new
_ContactCategory
(
new
AnnotatedRegion
<
SystemUiOverlayStyle
>(
icon:
Icons
.
call
,
value:
SystemUiOverlayStyle
.
light
,
children:
<
Widget
>[
child:
new
_ContactCategory
(
new
_ContactItem
(
icon:
Icons
.
call
,
icon:
Icons
.
message
,
children:
<
Widget
>[
tooltip:
'Send message'
,
new
_ContactItem
(
onPressed:
()
{
icon:
Icons
.
message
,
_scaffoldKey
.
currentState
.
showSnackBar
(
const
SnackBar
(
tooltip:
'Send message'
,
content:
const
Text
(
'Pretend that this opened your SMS application.'
)
onPressed:
()
{
));
_scaffoldKey
.
currentState
.
showSnackBar
(
const
SnackBar
(
},
content:
const
Text
(
'Pretend that this opened your SMS application.'
)
lines:
const
<
String
>[
));
'(650) 555-1234'
,
},
'Mobile'
,
lines:
const
<
String
>[
],
'(650) 555-1234'
,
),
'Mobile'
,
new
_ContactItem
(
],
icon:
Icons
.
message
,
),
tooltip:
'Send message'
,
new
_ContactItem
(
onPressed:
()
{
icon:
Icons
.
message
,
_scaffoldKey
.
currentState
.
showSnackBar
(
const
SnackBar
(
tooltip:
'Send message'
,
content:
const
Text
(
'A messaging app appears.'
)
onPressed:
()
{
));
_scaffoldKey
.
currentState
.
showSnackBar
(
const
SnackBar
(
},
content:
const
Text
(
'A messaging app appears.'
)
lines:
const
<
String
>[
));
'(323) 555-6789'
,
},
'Work'
,
lines:
const
<
String
>[
],
'(323) 555-6789'
,
),
'Work'
,
new
_ContactItem
(
],
icon:
Icons
.
message
,
),
tooltip:
'Send message'
,
new
_ContactItem
(
onPressed:
()
{
icon:
Icons
.
message
,
_scaffoldKey
.
currentState
.
showSnackBar
(
const
SnackBar
(
tooltip:
'Send message'
,
content:
const
Text
(
'Imagine if you will, a messaging application.'
)
onPressed:
()
{
));
_scaffoldKey
.
currentState
.
showSnackBar
(
const
SnackBar
(
},
content:
const
Text
(
'Imagine if you will, a messaging application.'
)
lines:
const
<
String
>[
));
'(650) 555-6789'
,
},
'Home'
,
lines:
const
<
String
>[
],
'(650) 555-6789'
,
),
'Home'
,
],
],
),
],
),
),
),
new
_ContactCategory
(
new
_ContactCategory
(
icon:
Icons
.
contact_mail
,
icon:
Icons
.
contact_mail
,
...
...
examples/flutter_gallery/lib/gallery/home.dart
View file @
d6465c47
...
@@ -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
;
}
}
...
...
packages/flutter/lib/src/services/system_chrome.dart
View file @
d6465c47
...
@@ -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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment