Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: sky/examples/fn/widgets/buttonbase.dart

Issue 971183002: Initial commit of Effen reactive framework experiment for Sky (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/fn/widgets/button.dart ('k') | sky/examples/fn/widgets/checkbox.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ });
+ }
+}
« no previous file with comments | « sky/examples/fn/widgets/button.dart ('k') | sky/examples/fn/widgets/checkbox.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698