Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Unified Diff: sky/sdk/lib/widgets/tool_bar.dart

Issue 1235693002: Make back button on stocks app search bar the accent color (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/sdk/lib/widgets/icon_button.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/widgets/tool_bar.dart
diff --git a/sky/sdk/lib/widgets/tool_bar.dart b/sky/sdk/lib/widgets/tool_bar.dart
index c8c361a506c54218837e37ea6d52d547933f3c35..6bea8ad80b84a714979161d65c03997ca001d919 100644
--- a/sky/sdk/lib/widgets/tool_bar.dart
+++ b/sky/sdk/lib/widgets/tool_bar.dart
@@ -30,14 +30,16 @@ class ToolBar extends Component {
Widget build() {
Color toolbarColor = backgroundColor;
- IconThemeColor iconThemeColor = IconThemeColor.white;
+ IconThemeData iconThemeData;
TextStyle defaultTextStyle = typography.white.title;
if (toolbarColor == null) {
ThemeData themeData = Theme.of(this);
toolbarColor = themeData.primaryColor;
if (themeData.primaryColorBrightness == ThemeBrightness.light) {
- iconThemeColor = IconThemeColor.black;
defaultTextStyle = typography.black.title;
+ iconThemeData = const IconThemeData(color: IconThemeColor.black);
+ } else {
+ iconThemeData = const IconThemeData(color: IconThemeColor.white);
}
}
@@ -49,10 +51,7 @@ class ToolBar extends Component {
children.add(
new Flexible(
child: new Padding(
- child: new DefaultTextStyle(
- style: defaultTextStyle,
- child: center
- ),
+ child: center,
padding: new EdgeDims.only(left: 24.0)
)
)
@@ -62,9 +61,9 @@ class ToolBar extends Component {
if (right != null)
children.addAll(right);
- return new Container(
- child: new IconTheme(
- data: new IconThemeData(color: iconThemeColor),
+ Widget content = new Container(
+ child: new DefaultTextStyle(
+ style: defaultTextStyle,
child: new Flex(
[new Container(child: new Flex(children), height: kToolBarHeight)],
alignItems: FlexAlignItems.end
@@ -76,6 +75,10 @@ class ToolBar extends Component {
boxShadow: shadows[2]
)
);
+
+ if (iconThemeData != null)
+ content = new IconTheme(data: iconThemeData, child: content);
+ return content;
}
}
« no previous file with comments | « sky/sdk/lib/widgets/icon_button.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698