tryTimeUTC method

  1. @override
DateTime? tryTimeUTC(
  1. K key, {
  2. DateTime parse(
    1. Object?
    )?,
})
override

Returns a value at key as DateTime in the UTC time zone, or null.

Use an optional parse function to define app specific conversion.

null is returned if an underlying value is unavailable or cannot be converted to DateTime.

Implementation

@override
DateTime? tryTimeUTC(K key, {DateTime Function(Object?)? parse}) {
  try {
    return getTimeUTC(key, parse: parse);
  } on Exception {
    return null;
  }
}