-
James Robinson authored
This introduces the notion of event disposition and allows event targets (widgets and render objects) to consume events that should not be processed further. This is needed by the Switch component in the Drawer in the stocks example. The Switch is embedded in a DrawerItem. The Switch handles the gesture tap event to toggle its state and should handle pointer events to allow swiping and draw its own radial reaction. The DrawerItem also handles gesture taps to allow toggling the switch value when tapping anywhere on the drawer and to draw its own ink splash. When tapping on the switch, both the switch's render object and the DrawerItem's listener are in the event dispatch path. The Switch needs to signal in some fashion that it consumed the event so the DrawerItem does not also try to toggle the switch's state.
53163f8b