$lerp static method

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

Wrapper for the WidgetStateProperty.lerp method

Implementation

static $Value? $lerp(Runtime runtime, $Value? target, List<$Value?> args) {
  final value = WidgetStateProperty.lerp(
    args[0]!.$value,
    args[1]!.$value,
    args[2]!.$value,
    (Object? arg0, Object? arg1, double arg2) {
      return (args[3]! as EvalCallable)(runtime, null, [
        if (arg0 == null) const $null() else runtime.wrapAlways(arg0),
        if (arg1 == null) const $null() else runtime.wrapAlways(arg1),
        $double(arg2),
      ])?.$value;
    },
  );
  return value == null ? const $null() : $WidgetStateProperty.wrap(value);
}