Index: sky/examples/fn/widgets/buttonbase.dart |
diff --git a/sky/examples/fn/widgets/buttonbase.dart b/sky/examples/fn/widgets/buttonbase.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..f7b1bf7e8dd40a8e82dea3be2fce1233fc4082f6 |
--- /dev/null |
+++ b/sky/examples/fn/widgets/buttonbase.dart |
@@ -0,0 +1,24 @@ |
+part of widgets; |
+ |
+abstract class ButtonBase extends Component { |
+ |
+ bool _highlight = false; |
+ |
+ ButtonBase({ Object key }) : super(key: key); |
+ |
+ void _handlePointerDown(_) { |
+ setState(() { |
+ _highlight = true; |
+ }); |
+ } |
+ void _handlePointerUp(_) { |
+ setState(() { |
+ _highlight = false; |
+ }); |
+ } |
+ void _handlePointerCancel(_) { |
+ setState(() { |
+ _highlight = false; |
+ }); |
+ } |
+} |