flutter/examples/fn/widgets/toolbar.dart
Adam Barth 65592c41cd Add constants for material colors and shadows
This CL removes the hard-coded colors and shadows from the fn widgets and
replaces them with compile-time constants. The color values are from the
material spec:

http://www.google.com/design/spec/style/color.html#color-color-palette

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/983733003
2015-03-05 09:58:23 -08:00

26 lines
456 B
Dart

part of widgets;
class Toolbar extends Component {
List<Node> children;
static final Style _style = new Style('''
display: flex;
align-items: center;
height: 84px;
z-index: 1;
background-color: ${Purple[500]};
color: white;
box-shadow: ${Shadow[2]};'''
);
Toolbar({String key, this.children}) : super(key: key);
Node render() {
return new Container(
style: _style,
children: children
);
}
}