anchor.diff:    static SyntheticUIEvent getEmptyUIEvent() => SyntheticUIEvent(null, null, null, null, () {}, () {}, null, null, null, null, 0, 'empty event', null, null);
     static SyntheticWheelEvent getEmptyWheelEvent() => SyntheticWheelEvent(null, null, null, null, () {}, () {}, null, null, null, null, 0, 'empty event', null, null, null, null);
   
  -
  -
  -
  -
  +  static SyntheticEvent buildEvent(SyntheticEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +    );
  +  }
  +
  +  static SyntheticClipboardEvent buildClipboardEvent(SyntheticClipboardEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticClipboardEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['clipboardData'] ?? event?.clipboardData,
  +    );
  +  }
  +
  +  static SyntheticKeyboardEvent buildKeyboardEvent(SyntheticKeyboardEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticKeyboardEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['altKey'] ?? event?.altKey,
  +      newEventFields['char'] ?? event?.char,
  +      newEventFields['ctrlKey'] ?? event?.ctrlKey,
  +      newEventFields['locale'] ?? event?.locale,
  +      newEventFields['location'] ?? event?.location,
  +      newEventFields['key'] ?? event?.key,
  +      newEventFields['metaKey'] ?? event?.metaKey,
  +      newEventFields['repeat'] ?? event?.repeat,
  +      newEventFields['shiftKey'] ?? event?.shiftKey,
  +      newEventFields['keyCode'] ?? event?.keyCode,
  +      newEventFields['charCode'] ?? event?.charCode,
  +    );
  +  }
  +
  +  static SyntheticCompositionEvent buildCompositionEvent(SyntheticCompositionEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticCompositionEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['data'] ?? event?.data,
  +    );
  +  }
  +
  +  static SyntheticFocusEvent buildFocusEvent(SyntheticFocusEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticFocusEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['relatedTarget'] ?? event?.relatedTarget,
  +    );
  +  }
  +
  +  static SyntheticFormEvent buildFormEvent(SyntheticFormEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticFormEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +    );
  +  }
  +
  +  static SyntheticMouseEvent buildMouseEvent(SyntheticMouseEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticMouseEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['altKey'] ?? event?.altKey,
  +      newEventFields['button'] ?? event?.button,
  +      newEventFields['buttons'] ?? event?.buttons,
  +      newEventFields['clientX'] ?? event?.clientX,
  +      newEventFields['clientY'] ?? event?.clientY,
  +      newEventFields['ctrlKey'] ?? event?.ctrlKey,
  +      newEventFields['dataTransfer'] ?? event?.dataTransfer,
  +      newEventFields['metaKey'] ?? event?.metaKey,
  +      newEventFields['pageX'] ?? event?.pageX,
  +      newEventFields['pageY'] ?? event?.pageY,
  +      newEventFields['relatedTarget'] ?? event?.relatedTarget,
  +      newEventFields['screenX'] ?? event?.screenX,
  +      newEventFields['screenY'] ?? event?.screenY,
  +      newEventFields['shiftKey'] ?? event?.shiftKey,
  +    );
  +  }
  +
  +  static SyntheticPointerEvent buildPointerEvent(SyntheticPointerEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticPointerEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['pointerId'] ?? event?.pointerId,
  +      newEventFields['width'] ?? event?.width,
  +      newEventFields['height'] ?? event?.height,
  +      newEventFields['pressure'] ?? event?.pressure,
  +      newEventFields['tangentialPressure'] ?? event?.tangentialPressure,
  +      newEventFields['tiltX'] ?? event?.tiltX,
  +      newEventFields['tiltY'] ?? event?.tiltY,
  +      newEventFields['twist'] ?? event?.twist,
  +      newEventFields['pointerType'] ?? event?.pointerType,
  +      newEventFields['isPrimary'] ?? event?.isPrimary,
  +    );
  +  }
  +
  +  static SyntheticTouchEvent buildTouchEvent(SyntheticTouchEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticTouchEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['altKey'] ?? event?.altKey,
  +      newEventFields['changedTouches'] ?? event?.changedTouches,
  +      newEventFields['ctrlKey'] ?? event?.ctrlKey,
  +      newEventFields['metaKey'] ?? event?.metaKey,
  +      newEventFields['shiftKey'] ?? event?.shiftKey,
  +      newEventFields['targetTouches'] ?? event?.targetTouches,
  +      newEventFields['touches'] ?? event?.touches,
  +    );
  +  }
  +
  +  static SyntheticTransitionEvent buildTransitionEvent(SyntheticTransitionEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticTransitionEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['propertyName'] ?? event?.propertyName,
  +      newEventFields['elapsedTime'] ?? event?.elapsedTime,
  +      newEventFields['pseudoElement'] ?? event?.pseudoElement,
  +    );
  +  }
  +
  +  static SyntheticAnimationEvent buildAnimationEvent(SyntheticAnimationEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticAnimationEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['animationName'] ?? event?.animationName,
  +      newEventFields['elapsedTime'] ?? event?.elapsedTime,
  +      newEventFields['pseudoElement'] ?? event?.pseudoElement,
  +    );
  +  }
  +
  +  static SyntheticUIEvent buildUIEvent(SyntheticUIEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticUIEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['detail'] ?? event?.detail,
  +      newEventFields['view'] ?? event?.view,
  +    );
  +  }
  +
  +  static SyntheticWheelEvent buildWheelEvent(SyntheticWheelEvent event, Map<String, dynamic> newEventFields) {
  +    return SyntheticWheelEvent(
  +      newEventFields['bubbles'] ?? event?.bubbles,
  +      newEventFields['cancelable'] ?? event?.cancelable,
  +      newEventFields['currentTarget'] ?? event?.currentTarget,
  +      newEventFields['defaultPrevented'] ?? event?.defaultPrevented,
  +      newEventFields['preventDefault'] ?? event?.preventDefault,
  +      newEventFields['stopPropagation'] ?? event?.stopPropagation,
  +      newEventFields['eventPhase'] ?? event?.eventPhase,
  +      newEventFields['isTrusted'] ?? event?.isTrusted,
  +      newEventFields['nativeEvent'] ?? event?.nativeEvent,
  +      newEventFields['target'] ?? event?.target,
  +      newEventFields['timeStamp'] ?? event?.timeStamp,
  +      newEventFields['type'] ?? event?.type,
  +      newEventFields['deltaX'] ?? event?.deltaX,
  +      newEventFields['deltaMode'] ?? event?.deltaMode,
  +      newEventFields['deltaY'] ?? event?.deltaY,
  +      newEventFields['deltaZ'] ?? event?.deltaZ,
  +    );
  +  }
   }
  -
  -
   
   // A temporary measure that will be removed when Duck typing is added
   // in the React 17 release branch.
  
positive.code: import '../../react.dart';
  
  enum EventType {
    SyntheticEvent,
    SyntheticClipboardEvent,
    SyntheticKeyboardEvent,
    SyntheticCompositionEvent,
    SyntheticFocusEvent,
    SyntheticFormEvent,
    SyntheticMouseEvent,
    SyntheticPointerEvent,
    SyntheticTouchEvent,
    SyntheticTransitionEvent,
    SyntheticAnimationEvent,
    SyntheticUIEvent,
    SyntheticWheelEvent,
  }
  
  
  SyntheticEvent getEmptyEventOfType(EventType type) {
    switch(type) {
      case EventType.SyntheticEvent:
        return SyntheticEventHelper.getEmptyEvent();
      case EventType.SyntheticClipboardEvent:
        return SyntheticEventHelper.getEmptyClipboardEvent();
      case EventType.SyntheticKeyboardEvent:
        return SyntheticEventHelper.getEmptyKeyboardEvent();
      case EventType.SyntheticCompositionEvent:
        return SyntheticEventHelper.getEmptyCompositionEvent();
      case EventType.SyntheticFocusEvent:
        return SyntheticEventHelper.getEmptyFocusEvent();
      case EventType.SyntheticFormEvent:
        return SyntheticEventHelper.getEmptyFormEvent();
      case EventType.SyntheticMouseEvent:
        return SyntheticEventHelper.getEmptyMouseEvent();
      case EventType.SyntheticPointerEvent:
        return SyntheticEventHelper.getEmptyPointerEvent();
      case EventType.SyntheticTouchEvent:
        return SyntheticEventHelper.getEmptyTouchEvent();
      case EventType.SyntheticTransitionEvent:
        return SyntheticEventHelper.getEmptyTransitionEvent();
      case EventType.SyntheticAnimationEvent:
        return SyntheticEventHelper.getEmptyAnimationEvent();
      case EventType.SyntheticUIEvent:
        return SyntheticEventHelper.getEmptyUIEvent();
      case EventType.SyntheticWheelEvent:
        return SyntheticEventHelper.getEmptyWheelEvent();
    }
  
    return null;
  }
  
  extension SyntheticEventTypeHelpers on SyntheticEvent {
    bool get isClipboardEvent => this.tryCast<SyntheticClipboardEvent>() != null;
  
negative.code:   bool get isWheelEvent => this.tryCast<SyntheticWheelEvent>() != null;
  }
  
  class _SyntheticEventHelper {
    static SyntheticEvent getEmptyEvent() => SyntheticEvent(null, null, null, null, () {}, () {}, null, null, null, null, 0, 'empty event');
    static SyntheticClipboardEvent getEmptyClipboardEvent() => SyntheticClipboardEvent(null, null, null, null, () {}, () {}, null, null, null, null, 0, 'empty event', null);
    static SyntheticKeyboardEvent getEmptyKeyboardEvent() => SyntheticKeyboardEvent(null, null, null, null, () {}, () {}, null, null, null, null, 0, null, null, null, null, null, null, null, null, null, null, null, null);
    static SyntheticCompositionEvent getEmptyCompositionEvent() => SyntheticCompositionEvent(null, null, null, null, () {}, () {}, null, null, null, null, 0, 'empty event', null);
  