copyWith method

KeyCode copyWith({
  1. KeyCodeName? name,
  2. String? char,
  3. MediaKeyCode? media,
  4. ModifierKeyCode? modifiers,
  5. int? baseLayoutKey,
})

Create a new instance of KeyCode with the given parameters.

Implementation

KeyCode copyWith({
  KeyCodeName? name,
  String? char,
  MediaKeyCode? media,
  ModifierKeyCode? modifiers,
  int? baseLayoutKey,
}) {
  return KeyCode(
    name: name ?? this.name,
    char: char ?? this.char,
    media: media ?? this.media,
    modifiers: modifiers ?? this.modifiers,
    baseLayoutKey: baseLayoutKey ?? this.baseLayoutKey,
  );
}