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

Unified Diff: sky/examples/stocks2/lib/stock_settings.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/examples/stocks2/lib/stock_settings.dart
diff --git a/sky/examples/stocks2/lib/stock_settings.dart b/sky/examples/stocks2/lib/stock_settings.dart
index 1fdfdf8d2468cd2613aa2267b9274d834aacc0ba..dc0b553fdf18233923f9c58f8b95f12e6db9f595 100644
--- a/sky/examples/stocks2/lib/stock_settings.dart
+++ b/sky/examples/stocks2/lib/stock_settings.dart
@@ -29,7 +29,7 @@ class StockSettings extends Component {
return new ToolBar(
left: new IconButton(
icon: 'navigation/arrow_back_white',
- onGestureTap: (_) => _navigator.pop()),
+ onPressed: _navigator.pop),
center: new Text('Settings', style: typography.white.title),
backgroundColor: colors.Purple[500]
);
@@ -43,7 +43,7 @@ class StockSettings extends Component {
new MenuItem(
key: 'Optimistic Setting',
icon: 'action/thumb_up',
- onGestureTap: (event) => _handleAwesomeChanged(!_awesome),
+ onPressed: () => _handleAwesomeChanged(!_awesome),
children: [
new Flexible(child: new Text('Everything is awesome')),
new Checkbox(key: 'awesome', value: _awesome, onChanged: _handleAwesomeChanged)

Powered by Google App Engine
This is Rietveld 408576698