Index: sky/framework/components/button_base.dart |
diff --git a/sky/examples/fn/widgets/buttonbase.dart b/sky/framework/components/button_base.dart |
similarity index 53% |
rename from sky/examples/fn/widgets/buttonbase.dart |
rename to sky/framework/components/button_base.dart |
index a69202280188acaf268d3e7b3b446d76bc401dbd..baf590a44e7afd149e12803bb21e6e473247f42e 100644 |
--- a/sky/examples/fn/widgets/buttonbase.dart |
+++ b/sky/framework/components/button_base.dart |
@@ -1,8 +1,12 @@ |
-part of widgets; |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
-abstract class ButtonBase extends MaterialComponent { |
+import '../fn.dart'; |
+import 'material.dart'; |
- bool _highlight = false; |
+abstract class ButtonBase extends Material { |
+ bool highlight = false; |
ButtonBase({ Object key }) : super(key: key) { |
events.listen('pointerdown', _handlePointerDown); |
@@ -12,17 +16,17 @@ abstract class ButtonBase extends MaterialComponent { |
void _handlePointerDown(_) { |
setState(() { |
- _highlight = true; |
+ highlight = true; |
}); |
} |
void _handlePointerUp(_) { |
setState(() { |
- _highlight = false; |
+ highlight = false; |
}); |
} |
void _handlePointerCancel(_) { |
setState(() { |
- _highlight = false; |
+ highlight = false; |
}); |
} |
} |