$new static method

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

Wrapper for the KeyboardOptions.new constructor

Implementation

static $Value? $new(Runtime runtime, $Value? thisValue, List<$Value?> args) {
  return $KeyboardOptions.wrap(
    KeyboardOptions(
      enableArrowKeysPanning: args[0]?.$value ?? true,
      enableWASDPanning: args[1]?.$value ?? false,
      enableQERotating: args[2]?.$value ?? false,
      enableRFZooming: args[3]?.$value ?? false,
      maxPanVelocity: (double zoom) {
        return (args[4]! as EvalCallable?)?.call(runtime, null, [
          $double(zoom),
        ])?.$value;
      },
      panLeapVelocityMultiplier: args[5]?.$value ?? 5,
      maxZoomVelocity: args[6]?.$value ?? 0.03,
      zoomLeapVelocityMultiplier: args[7]?.$value ?? 3,
      maxRotateVelocity: args[8]?.$value ?? 3,
      rotateLeapVelocityMultiplier: args[9]?.$value ?? 3,
      animationCurveDuration:
          args[10]?.$value ?? const Duration(milliseconds: 450),
      animationCurveReverseDuration:
          args[11]?.$value ?? const Duration(milliseconds: 600),
      animationCurveCurve: args[12]?.$value ?? Curves.easeInOut,
      performLeapTriggerDuration:
          args[13]?.$value ?? const Duration(milliseconds: 100),
      leapMaxOfCurveComponent: args[14]?.$value ?? 0.6,
      focusNode: args[15]?.$value,
      autofocus: args[16]?.$value ?? true,
    ),
  );
}