Index: sky/sdk/lib/widgets/icon_button.dart |
diff --git a/sky/sdk/lib/widgets/icon_button.dart b/sky/sdk/lib/widgets/icon_button.dart |
index a7ae568a096047ab0ac1d5271319b48caf98ddf0..2b39ec2579ba5520710d694052ab318738eb88bd 100644 |
--- a/sky/sdk/lib/widgets/icon_button.dart |
+++ b/sky/sdk/lib/widgets/icon_button.dart |
@@ -9,18 +9,22 @@ import 'widget.dart'; |
class IconButton extends Component { |
- IconButton({ String icon: '', this.onGestureTap }) |
+ IconButton({ String icon: '', this.onPressed }) |
: super(key: icon), icon = icon; |
final String icon; |
- final GestureEventListener onGestureTap; |
+ final Function onPressed; |
Widget build() { |
return new Listener( |
child: new Padding( |
child: new Icon(type: icon, size: 24), |
padding: const EdgeDims.all(8.0)), |
- onGestureTap: onGestureTap); |
+ onGestureTap: (_) { |
+ if (onPressed != null) |
+ onPressed(); |
+ } |
+ ); |
} |
} |