WheelEvent constructor

WheelEvent(
  1. String type,
  2. {Window? view,
  3. num deltaX = 0,
  4. num deltaY = 0,
  5. num deltaZ = 0,
  6. int deltaMode = 0,
  7. int detail = 0,
  8. int screenX = 0,
  9. int screenY = 0,
  10. int clientX = 0,
  11. int clientY = 0,
  12. int button = 0,
  13. bool canBubble = true,
  14. bool cancelable = true,
  15. bool ctrlKey = false,
  16. bool altKey = false,
  17. bool shiftKey = false,
  18. bool metaKey = false,
  19. EventTarget? relatedTarget}
)

Implementation

factory WheelEvent(String type,
    {Window? view,
    num deltaX = 0,
    num deltaY = 0,
    num deltaZ = 0,
    int deltaMode = 0,
    int detail = 0,
    int screenX = 0,
    int screenY = 0,
    int clientX = 0,
    int clientY = 0,
    int button = 0,
    bool canBubble = true,
    bool cancelable = true,
    bool ctrlKey = false,
    bool altKey = false,
    bool shiftKey = false,
    bool metaKey = false,
    EventTarget? relatedTarget}) {
  var options = {
    'view': view,
    'deltaMode': deltaMode,
    'deltaX': deltaX,
    'deltaY': deltaY,
    'deltaZ': deltaZ,
    'detail': detail,
    'screenX': screenX,
    'screenY': screenY,
    'clientX': clientX,
    'clientY': clientY,
    'button': button,
    'bubbles': canBubble,
    'cancelable': cancelable,
    'ctrlKey': ctrlKey,
    'altKey': altKey,
    'shiftKey': shiftKey,
    'metaKey': metaKey,
    'relatedTarget': relatedTarget,
  };

  if (view == null) {
    view = window;
  }

  return JS('WheelEvent', 'new WheelEvent(#, #)', type,
      convertDartToNative_Dictionary(options));
}