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

Unified Diff: sky/examples/widgets/styled_text.dart

Issue 1174213005: Adds TextStyle decoration, decorationColor, decorationStyle (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Updated per review feedback Created 5 years, 6 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 | « no previous file | sky/sdk/lib/painting/text_style.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/widgets/styled_text.dart
diff --git a/sky/examples/widgets/styled_text.dart b/sky/examples/widgets/styled_text.dart
index 1c3c432de103436316044f1010fdf8b7bc454e02..f9c98045498c443a144d2ea1f0829b2e7a1d4c35 100644
--- a/sky/examples/widgets/styled_text.dart
+++ b/sky/examples/widgets/styled_text.dart
@@ -43,13 +43,14 @@ HAL: This mission is too important for me to allow you to jeopardize it.''';
final TextStyle daveStyle = new TextStyle(color: Indigo[400]);
final TextStyle halStyle = new TextStyle(color: Red[400], fontFamily: "monospace");
- final TextStyle boldStyle = new TextStyle(fontWeight: bold);
+ final TextStyle boldStyle = const TextStyle(fontWeight: bold);
+ final TextStyle underlineStyle = const TextStyle(decoration: underline);
Component toStyledText(String name, String text) {
TextStyle lineStyle = (name == "Dave") ? daveStyle : halStyle;
return new StyledText(
key: text,
- elements: [lineStyle, [boldStyle, name + ":"], text]
+ elements: [lineStyle, [boldStyle, [underlineStyle, name], ":"], text]
);
}
« no previous file with comments | « no previous file | sky/sdk/lib/painting/text_style.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698