tryParseTimestamp method

DateTime? tryParseTimestamp(
  1. String timestamp, {
  2. bool isUtc = false,
})

Try to parse timestamp to DateTime.

Implementation

DateTime? tryParseTimestamp(String timestamp, {bool isUtc = false}) {
  try {
    return parseTimestamp(timestamp, isUtc: isUtc);
  } catch (e) {
    return null;
  }
}