From de7f8984424c74874610ce6259f38a4ad1c4adec Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 16 Mar 2015 20:53:55 -0700 Subject: [PATCH] Cleanup events related to material splashes This CL is a warmup for using a more sophisticated gesture disambiguation. 1) Use gesturetap instead of click. We should probably remove click events because folks should use gesturetap to integrate with the gesture system. 2) Handle the case where you swipe the drawer during an animation. Previously we had an assert which triggered in some multitouch scenarios. We'll eventually move this over to gestureswipe. 3) Remove an extra container for ink splashes. There's no need to group all the ink splashes in a container. They can all just be children of the Material component itself. This structure is left over from when Material was a base class. R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1013713005 --- examples/stocks-fn/stocksapp.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/stocks-fn/stocksapp.dart b/examples/stocks-fn/stocksapp.dart index 0f806162de..83e3c978d3 100644 --- a/examples/stocks-fn/stocksapp.dart +++ b/examples/stocks-fn/stocksapp.dart @@ -109,7 +109,7 @@ class StocksApp extends App { new Icon(key: 'menu', style: _iconStyle, size: 24, type: 'navigation/menu_white') - ..events.listen('click', _drawerAnimation.toggle), + ..events.listen('gesturetap', _drawerAnimation.toggle), new Container( style: _titleStyle, children: [title] @@ -117,7 +117,7 @@ class StocksApp extends App { new Icon(key: 'search', style: _iconStyle, size: 24, type: 'action/search_white') - ..events.listen('click', _handleSearchClick), + ..events.listen('gesturetap', _handleSearchClick), new Icon(key: 'more_white', style: _iconStyle, size: 24, type: 'navigation/more_vert_white')