| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 import '../fn.dart'; | 5 import '../fn.dart'; |
| 6 import 'material.dart'; | 6 import 'material.dart'; |
| 7 import '../theme/colors.dart'; | 7 import '../theme/colors.dart'; |
| 8 | 8 |
| 9 class FloatingActionButton extends Component { | 9 class FloatingActionButton extends Component { |
| 10 // TODO(abarth): We need a better way to become a container for absolutely |
| 11 // positioned elements. |
| 10 static final Style _style = new Style(''' | 12 static final Style _style = new Style(''' |
| 11 position: absolute; | |
| 12 bottom: 16px; | |
| 13 right: 16px; | |
| 14 transform: translateX(0); | 13 transform: translateX(0); |
| 15 width: 56px; | 14 width: 56px; |
| 16 height: 56px; | 15 height: 56px; |
| 17 background-color: ${Red[500]}; | 16 background-color: ${Red[500]}; |
| 18 border-radius: 28px;''' | 17 border-radius: 28px;''' |
| 19 ); | 18 ); |
| 20 static final Style _clipStyle = new Style(''' | 19 static final Style _clipStyle = new Style(''' |
| 21 transform: translateX(0); | 20 transform: translateX(0); |
| 22 position: absolute; | 21 position: absolute; |
| 23 display: flex; | 22 display: flex; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 47 children: [ | 46 children: [ |
| 48 new Material( | 47 new Material( |
| 49 key: "Clip", | 48 key: "Clip", |
| 50 style: _clipStyle, | 49 style: _clipStyle, |
| 51 children: children | 50 children: children |
| 52 ) | 51 ) |
| 53 ] | 52 ] |
| 54 ); | 53 ); |
| 55 } | 54 } |
| 56 } | 55 } |
| OLD | NEW |