| 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 'button_base.dart'; | 6 import 'button_base.dart'; |
| 7 import 'icon.dart'; | 7 import 'icon.dart'; |
| 8 import 'material.dart'; | 8 import 'material.dart'; |
| 9 | 9 |
| 10 class MenuItem extends ButtonBase { | 10 class MenuItem extends ButtonBase { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 flex: 1;''' | 36 flex: 1;''' |
| 37 ); | 37 ); |
| 38 | 38 |
| 39 List<Node> children; | 39 List<Node> children; |
| 40 String icon; | 40 String icon; |
| 41 | 41 |
| 42 MenuItem({ Object key, this.icon, this.children }) : super(key: key); | 42 MenuItem({ Object key, this.icon, this.children }) : super(key: key); |
| 43 | 43 |
| 44 Node build() { | 44 Node build() { |
| 45 return new Material ( | 45 return new Material ( |
| 46 style: highlight ? _highlightStyle : _style, | 46 styles: [highlight ? _highlightStyle : _style], |
| 47 children: [ | 47 children: [ |
| 48 new Icon( | 48 new Icon( |
| 49 style: _iconStyle, | 49 styles: [_iconStyle], |
| 50 size: 24, | 50 size: 24, |
| 51 type: "${icon}_grey600" | 51 type: "${icon}_grey600" |
| 52 ), | 52 ), |
| 53 new Container( | 53 new Container( |
| 54 style: _labelStyle, | 54 styles: [_labelStyle], |
| 55 children: children | 55 children: children |
| 56 ) | 56 ) |
| 57 ] | 57 ] |
| 58 ); | 58 ); |
| 59 } | 59 } |
| 60 } | 60 } |
| OLD | NEW |