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

Unified Diff: sky/sdk/lib/widgets/modal_overlay.dart

Issue 1188993003: Use semantic names for callbacks instead of onGestureTap (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
Index: sky/sdk/lib/widgets/modal_overlay.dart
diff --git a/sky/sdk/lib/widgets/modal_overlay.dart b/sky/sdk/lib/widgets/modal_overlay.dart
index 5ded5facfe2c5eaf206c16a8ee3b84fa543de9c5..0de6a4e7d1dcf408e21fd62cde83496d025c4222 100644
--- a/sky/sdk/lib/widgets/modal_overlay.dart
+++ b/sky/sdk/lib/widgets/modal_overlay.dart
@@ -9,20 +9,17 @@ class ModalOverlay extends Component {
ModalOverlay({ String key, this.children, this.onDismiss }) : super(key: key);
- // static final Style _style = new Style('''
- // position: absolute;
- // top: 0;
- // left: 0;
- // bottom: 0;
- // right: 0;''');
-
final List<Widget> children;
- final GestureEventListener onDismiss;
+ final Function onDismiss;
Widget build() {
return new Listener(
- child: new Stack(children),
- onGestureTap: onDismiss);
+ onGestureTap: (_) {
+ if (onDismiss != null)
+ onDismiss();
+ },
+ child: new Stack(children)
+ );
}
}
« sky/sdk/lib/widgets/floating_action_button.dart ('K') | « sky/sdk/lib/widgets/menu_item.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698