copyWith method

KeyCode copyWith({
  1. KeyCodeKind? kind,
  2. KeyCodeName? name,
  3. String? char,
  4. int? baseLayoutKey,
  5. bool? shiftProduced,
})

Create a new instance of KeyCode with the given parameters.

Implementation

KeyCode copyWith({
  KeyCodeKind? kind,
  KeyCodeName? name,
  String? char,
  int? baseLayoutKey,
  bool? shiftProduced,
}) {
  return KeyCode._(
    kind: kind ?? this.kind,
    name: name ?? this.name,
    char: char ?? this.char,
    baseLayoutKey: baseLayoutKey ?? this.baseLayoutKey,
    shiftProduced: shiftProduced ?? this.shiftProduced,
  );
}