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