| 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 | 7 |
| 8 typedef void ValueChanged(value); | 8 typedef void ValueChanged(value); |
| 9 | 9 |
| 10 class Checkbox extends ButtonBase { | 10 class Checkbox extends ButtonBase { |
| 11 static final Style _style = new Style(''' | 11 static final Style _style = new Style(''' |
| 12 transform: translateX(0); | 12 transform: translateX(0); |
| 13 display: flex; | 13 display: flex; |
| 14 flex-direction: row; |
| 14 justify-content: center; | 15 justify-content: center; |
| 15 align-items: center; | 16 align-items: center; |
| 16 -webkit-user-select: none; | 17 -webkit-user-select: none; |
| 17 cursor: pointer; | 18 cursor: pointer; |
| 18 width: 30px; | 19 width: 30px; |
| 19 height: 30px;''' | 20 height: 30px;''' |
| 20 ); | 21 ); |
| 21 | 22 |
| 22 static final Style _containerStyle = new Style(''' | 23 static final Style _containerStyle = new Style(''' |
| 23 border: solid 2px; | 24 border: solid 2px; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 style: checked ? _checkedStyle : _uncheckedStyle | 77 style: checked ? _checkedStyle : _uncheckedStyle |
| 77 ) | 78 ) |
| 78 ] | 79 ] |
| 79 ) | 80 ) |
| 80 ] | 81 ] |
| 81 ), | 82 ), |
| 82 onGestureTap: _handleClick | 83 onGestureTap: _handleClick |
| 83 ); | 84 ); |
| 84 } | 85 } |
| 85 } | 86 } |
| OLD | NEW |