$tryParse static method

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

Wrapper of num.tryParse

Implementation

static $Value $tryParse(Runtime runtime, $Value? target, List<$Value?> args) {
  final source = args[0]!.$value as String;
  final result = double.tryParse(source);
  if (result == null) {
    return $null();
  }
  return $double(result);
}