copyWith method

MouseMsg copyWith({
  1. MouseAction? action,
  2. MouseButton? button,
  3. int? x,
  4. int? y,
  5. bool? ctrl,
  6. bool? alt,
  7. bool? shift,
})

Creates a copy of this message with some fields replaced.

Implementation

MouseMsg copyWith({
  MouseAction? action,
  MouseButton? button,
  int? x,
  int? y,
  bool? ctrl,
  bool? alt,
  bool? shift,
}) {
  return MouseMsg(
    action: action ?? this.action,
    button: button ?? this.button,
    x: x ?? this.x,
    y: y ?? this.y,
    ctrl: ctrl ?? this.ctrl,
    alt: alt ?? this.alt,
    shift: shift ?? this.shift,
  );
}