KeyEvent class final

Represent a Key event.

Inheritance
Annotations
  • @immutable

Constructors

KeyEvent(KeyCode code, {KeyModifiers modifiers = KeyModifiers.none, KeyEventType eventType = KeyEventType.keyPress})
Constructs a new instance of KeyEvent.
const
KeyEvent.fromString(String spec)
Parses a key specification string into a KeyEvent.
factory

Properties

code KeyCode
The key code.
final
eventType KeyEventType
The type of the event.
final
hashCode int
The hash code for this object.
no setteroverride
modifiers KeyModifiers
The key modifiers that could have been pressed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({KeyCode? code, KeyModifiers? modifiers, KeyEventType? eventType}) KeyEvent
Creates a copy of this KeyEvent with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toSpec() String
Converts this KeyEvent to a specification string.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override