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

Side by Side Diff: sky/examples/fn/widgets/button.dart

Issue 971183002: Initial commit of Effen reactive framework experiment for Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 unified diff | Download patch
« no previous file with comments | « sky/examples/fn/widgets/box.dart ('k') | sky/examples/fn/widgets/buttonbase.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 part of widgets;
2
3 class Button extends ButtonBase {
4
5 static Style _style = new Style('''
6 display: inline-flex;
7 border-radius: 4px;
8 justify-content: center;
9 align-items: center;
10 border: 1px solid blue;
11 -webkit-user-select: none;
12 margin: 5px;'''
13 );
14
15 static Style _highlightStyle = new Style('''
16 display: inline-flex;
17 border-radius: 4px;
18 justify-content: center;
19 align-items: center;
20 border: 1px solid blue;
21 -webkit-user-select: none;
22 margin: 5px;
23 background-color: orange;'''
24 );
25
26 Node content;
27 sky.EventListener onClick;
28
29 Button({ Object key, this.content, this.onClick }) : super(key: key);
30
31 Node render() {
32 return new Container(
33 key: 'Button',
34 style: _highlight ? _highlightStyle : _style,
35 onClick: onClick,
36 onPointerDown: _handlePointerDown,
37 onPointerUp: _handlePointerUp,
38 onPointerCancel: _handlePointerCancel,
39 children: [content]
40 );
41 }
42 }
OLDNEW
« no previous file with comments | « sky/examples/fn/widgets/box.dart ('k') | sky/examples/fn/widgets/buttonbase.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698