flutter/examples/fn/widgets/button.dart
Rafael Weinstein 409b12e5df Change the name of Component.render to Component.build in Effen.
"Render" is misleading. "Build" may not be the best word either, it's closer to what's actually happening.

R=ojan@chromium.org
TBR=abarth
BUG=

Review URL: https://codereview.chromium.org/992033002
2015-03-09 13:30:13 -07:00

40 lines
852 B
Dart

part of widgets;
class Button extends ButtonBase {
static Style _style = new Style('''
transform: translateX(0);
display: inline-flex;
border-radius: 4px;
justify-content: center;
align-items: center;
border: 1px solid blue;
-webkit-user-select: none;
margin: 5px;'''
);
static Style _highlightStyle = new Style('''
transform: translateX(0);
display: inline-flex;
border-radius: 4px;
justify-content: center;
align-items: center;
border: 1px solid blue;
-webkit-user-select: none;
margin: 5px;
background-color: orange;'''
);
Node content;
Button({ Object key, this.content }) : super(key: key);
Node build() {
return new Container(
key: 'Button',
style: _highlight ? _highlightStyle : _style,
children: [super.build(), content]
);
}
}