copyWith method
Creates a copy of this key with the given fields replaced.
Implementation
Key copyWith({
KeyType? type,
List<int>? runes,
bool? ctrl,
bool? alt,
bool? shift,
bool? isRelease,
bool? isRepeat,
}) {
return Key(
type ?? this.type,
runes: runes ?? this.runes,
ctrl: ctrl ?? this.ctrl,
alt: alt ?? this.alt,
shift: shift ?? this.shift,
isRelease: isRelease ?? this.isRelease,
isRepeat: isRepeat ?? this.isRepeat,
);
}