Commit 0dd98719 authored by Hans Muller's avatar Hans Muller

Adds TextStyle decoration, decorationColor, decorationStyle

Currently only the decoration property is actually translated to a CSS style.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1174213005.
parent b06190fb
......@@ -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]
);
}
......
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