OLD | NEW |
1 part of widgets; | 1 part of widgets; |
2 | 2 |
3 class FloatingActionButton extends MaterialComponent { | 3 class FloatingActionButton extends MaterialComponent { |
4 // TODO(rafaelw): Ganesh has problems with box shadows | |
5 // box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); | |
6 | |
7 static final Style _style = new Style(''' | 4 static final Style _style = new Style(''' |
8 position: absolute; | 5 position: absolute; |
9 bottom: 16px; | 6 bottom: 16px; |
10 right: 16px; | 7 right: 16px; |
11 z-index: 5; | 8 z-index: 5; |
12 transform: translateX(0); | 9 transform: translateX(0); |
13 width: 56px; | 10 width: 56px; |
14 height: 56px; | 11 height: 56px; |
15 background-color: ${Red[500]}; | 12 background-color: ${Red[500]}; |
16 color: white; | 13 color: white; |
| 14 box-shadow: ${Shadow[3]}; |
17 border-radius: 28px;''' | 15 border-radius: 28px;''' |
18 ); | 16 ); |
19 static final Style _clipStyle = new Style(''' | 17 static final Style _clipStyle = new Style(''' |
20 transform: translateX(0); | 18 transform: translateX(0); |
21 position: absolute; | 19 position: absolute; |
22 display: flex; | 20 display: flex; |
23 justify-content: center; | 21 justify-content: center; |
24 align-items: center; | 22 align-items: center; |
25 top: 0; | 23 top: 0; |
26 left: 0; | 24 left: 0; |
(...skipping 17 matching lines...) Expand all Loading... |
44 children: [ | 42 children: [ |
45 new Container( | 43 new Container( |
46 key: "Clip", | 44 key: "Clip", |
47 style: _clipStyle, | 45 style: _clipStyle, |
48 children: children | 46 children: children |
49 ) | 47 ) |
50 ] | 48 ] |
51 ); | 49 ); |
52 } | 50 } |
53 } | 51 } |
OLD | NEW |