OLD | NEW |
1 part of widgets; | 1 part of widgets; |
2 | 2 |
3 abstract class ButtonBase extends Component { | 3 abstract class ButtonBase extends MaterialComponent { |
4 | 4 |
5 bool _highlight = false; | 5 bool _highlight = false; |
6 | 6 |
7 ButtonBase({ Object key }) : super(key: key); | 7 ButtonBase({ Object key }) : super(key: key); |
8 | 8 |
9 void _handlePointerDown(_) { | 9 void _handlePointerDown(_) { |
10 setState(() { | 10 setState(() { |
11 _highlight = true; | 11 _highlight = true; |
12 }); | 12 }); |
13 } | 13 } |
14 void _handlePointerUp(_) { | 14 void _handlePointerUp(_) { |
15 setState(() { | 15 setState(() { |
16 _highlight = false; | 16 _highlight = false; |
17 }); | 17 }); |
18 } | 18 } |
19 void _handlePointerCancel(_) { | 19 void _handlePointerCancel(_) { |
20 setState(() { | 20 setState(() { |
21 _highlight = false; | 21 _highlight = false; |
22 }); | 22 }); |
23 } | 23 } |
24 } | 24 } |
OLD | NEW |