$new static method

$Value? $new(
  1. Runtime runtime,
  2. $Value? thisValue,
  3. List<$Value?> args
)

Wrapper for the KeyDownEvent.new constructor

Implementation

static $Value? $new(Runtime runtime, $Value? thisValue, List<$Value?> args) {
  return $KeyDownEvent.wrap(
    KeyDownEvent(
      physicalKey: args[0]!.$value,
      logicalKey: args[1]!.$value,
      character: args[2]?.$value,
      timeStamp: args[3]!.$value,
      synthesized: args[4]?.$value ?? false,
      deviceType: args[5]?.$value ?? KeyEventDeviceType.keyboard,
    ),
  );
}