copyWith method
Creates a copy of this KeyEvent with the given fields replaced.
Implementation
KeyEvent copyWith({
KeyCode? code,
KeyModifiers? modifiers,
KeyEventType? eventType,
}) {
return KeyEvent(
code ?? this.code,
modifiers: modifiers ?? this.modifiers,
eventType: eventType ?? this.eventType,
);
}