$new static method

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

Implementation

static $Value? $new(Runtime runtime, $Value? target, List<$Value?> args) {
  return $TextButton.wrap(TextButton(
    onPressed: args[0] == null
        ? null
        : () => (args[0]! as EvalCallable).call(runtime, null, []),
    child: args[1]?.$value,
  ));
}