OLD | NEW |
1 part of widgets; | 1 part of widgets; |
2 | 2 |
3 class FloatingActionButton extends MaterialComponent { | 3 class FloatingActionButton extends MaterialComponent { |
4 static final Style _style = new Style(''' | 4 static final Style _style = new Style(''' |
5 position: absolute; | 5 position: absolute; |
6 bottom: 16px; | 6 bottom: 16px; |
7 right: 16px; | 7 right: 16px; |
8 z-index: 5; | 8 z-index: 5; |
9 transform: translateX(0); | 9 transform: translateX(0); |
10 width: 56px; | 10 width: 56px; |
(...skipping 12 matching lines...) Expand all Loading... |
23 top: 0; | 23 top: 0; |
24 left: 0; | 24 left: 0; |
25 right: 0; | 25 right: 0; |
26 bottom: 0; | 26 bottom: 0; |
27 -webkit-clip-path: circle(28px at center);'''); | 27 -webkit-clip-path: circle(28px at center);'''); |
28 | 28 |
29 Node content; | 29 Node content; |
30 | 30 |
31 FloatingActionButton({ Object key, this.content }) : super(key: key); | 31 FloatingActionButton({ Object key, this.content }) : super(key: key); |
32 | 32 |
33 Node render() { | 33 Node build() { |
34 List<Node> children = [super.render()]; | 34 List<Node> children = [super.build()]; |
35 | 35 |
36 if (content != null) | 36 if (content != null) |
37 children.add(content); | 37 children.add(content); |
38 | 38 |
39 return new Container( | 39 return new Container( |
40 key: "Container", | 40 key: "Container", |
41 style: _style, | 41 style: _style, |
42 children: [ | 42 children: [ |
43 new Container( | 43 new Container( |
44 key: "Clip", | 44 key: "Clip", |
45 style: _clipStyle, | 45 style: _clipStyle, |
46 children: children | 46 children: children |
47 ) | 47 ) |
48 ] | 48 ] |
49 ); | 49 ); |
50 } | 50 } |
51 } | 51 } |
OLD | NEW |