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

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

Issue 975863003: Don't hardcode the list of events types in fn (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: More careful event syncing 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
index 461b44d49ab95c7c44e16de1e133f5df246ff16d..a69202280188acaf268d3e7b3b446d76bc401dbd 100644
--- a/sky/examples/fn/widgets/buttonbase.dart
+++ b/sky/examples/fn/widgets/buttonbase.dart
@@ -4,7 +4,11 @@ abstract class ButtonBase extends MaterialComponent {
bool _highlight = false;
- ButtonBase({ Object key }) : super(key: key);
+ ButtonBase({ Object key }) : super(key: key) {
+ events.listen('pointerdown', _handlePointerDown);
+ events.listen('pointerup', _handlePointerUp);
+ events.listen('pointercancel', _handlePointerCancel);
+ }
void _handlePointerDown(_) {
setState(() {
« 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