$tryParse static method

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

Implementation

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