| 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 '../painting/box_painter.dart'; | 5 import '../painting/box_painter.dart'; |
| 6 import '../theme/colors.dart' as colors; | 6 import '../theme/colors.dart' as colors; |
| 7 import '../theme/edges.dart'; | 7 import '../theme/edges.dart'; |
| 8 import '../theme/shadows.dart'; | 8 import '../theme/shadows.dart'; |
| 9 import 'basic.dart'; | 9 import 'basic.dart'; |
| 10 import 'default_text_style.dart'; | 10 import 'default_text_style.dart'; |
| 11 import 'theme.dart'; | 11 import 'theme.dart'; |
| 12 | 12 |
| 13 export '../theme/edges.dart' show MaterialEdge; |
| 14 |
| 13 class Material extends Component { | 15 class Material extends Component { |
| 14 | 16 |
| 15 Material({ | 17 Material({ |
| 16 String key, | 18 String key, |
| 17 this.child, | 19 this.child, |
| 18 this.edge: MaterialEdge.card, | 20 this.edge: MaterialEdge.card, |
| 19 this.level: 0, | 21 this.level: 0, |
| 20 this.color | 22 this.color |
| 21 }) : super(key: key); | 23 }) : super(key: key); |
| 22 | 24 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 44 boxShadow: shadows[level], | 46 boxShadow: shadows[level], |
| 45 borderRadius: edges[edge], | 47 borderRadius: edges[edge], |
| 46 backgroundColor: backgroundColor, | 48 backgroundColor: backgroundColor, |
| 47 shape: edge == MaterialEdge.circle ? Shape.circle : Shape.rectangle | 49 shape: edge == MaterialEdge.circle ? Shape.circle : Shape.rectangle |
| 48 ), | 50 ), |
| 49 child: new DefaultTextStyle(style: Theme.of(this).text.body1, child: child
) | 51 child: new DefaultTextStyle(style: Theme.of(this).text.body1, child: child
) |
| 50 ); | 52 ); |
| 51 } | 53 } |
| 52 | 54 |
| 53 } | 55 } |
| OLD | NEW |