| 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 '../fn2.dart'; | 5 import '../fn2.dart'; |
| 6 import '../rendering/box.dart'; | 6 import '../rendering/box.dart'; |
| 7 import '../painting/shadows.dart'; | 7 import '../painting/shadows.dart'; |
| 8 import '../theme2/colors.dart'; | 8 import '../theme2/colors.dart'; |
| 9 import 'dart:sky' as sky; | 9 import 'dart:sky' as sky; |
| 10 import 'ink_well.dart'; | 10 import 'ink_well.dart'; |
| 11 import 'material.dart'; | 11 import 'material.dart'; |
| 12 | 12 |
| 13 // TODO(eseidel): This needs to change based on device size? |
| 14 // http://www.google.com/design/spec/layout/metrics-keylines.html#metrics-keylin
es-keylines-spacing |
| 13 const double _kSize = 56.0; | 15 const double _kSize = 56.0; |
| 14 | 16 |
| 15 class FloatingActionButton extends Component { | 17 class FloatingActionButton extends Component { |
| 16 | 18 |
| 17 FloatingActionButton({ Object key, this.content, this.level: 0 }) | 19 FloatingActionButton({ Object key, this.content, this.level: 0 }) |
| 18 : super(key: key); | 20 : super(key: key); |
| 19 | 21 |
| 20 final UINode content; | 22 final UINode content; |
| 21 final int level; | 23 final int level; |
| 22 | 24 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 39 canvas.drawCircle(radius, radius, radius, paint); | 41 canvas.drawCircle(radius, radius, radius, paint); |
| 40 }, | 42 }, |
| 41 child: new Container( | 43 child: new Container( |
| 42 width: _kSize, | 44 width: _kSize, |
| 43 height: _kSize, | 45 height: _kSize, |
| 44 child: new InkWell(children: children))), | 46 child: new InkWell(children: children))), |
| 45 level: level); | 47 level: level); |
| 46 } | 48 } |
| 47 | 49 |
| 48 } | 50 } |
| OLD | NEW |