copyWith method

PCanvasKeyEvent copyWith({
  1. String? type,
  2. int? charCode,
  3. String? code,
  4. String? key,
  5. bool? ctrlKey,
  6. bool? altKey,
  7. bool? shiftKey,
  8. bool? metaKey,
  9. PCanvasElement? targetElement,
  10. PCanvasKeyEvent? parentEvent,
  11. PCanvas? pCanvas,
})

Copies this instance overwriting with the passed parameters.

Implementation

PCanvasKeyEvent copyWith(
        {String? type,
        int? charCode,
        String? code,
        String? key,
        bool? ctrlKey,
        bool? altKey,
        bool? shiftKey,
        bool? metaKey,
        PCanvasElement? targetElement,
        PCanvasKeyEvent? parentEvent,
        PCanvas? pCanvas}) =>
    PCanvasKeyEvent(
        type ?? this.type,
        charCode ?? this.charCode,
        code ?? this.code,
        key ?? this.key,
        ctrlKey ?? this.ctrlKey,
        altKey ?? this.altKey,
        shiftKey ?? this.shiftKey,
        metaKey ?? this.metaKey,
        targetElement: targetElement ?? this.targetElement,
        parentEvent: parentEvent ?? this.parentEvent,
        pCanvas: pCanvas ?? this.pCanvas,
        nativeEvent: nativeEvent);