getTimestamp method

Timestamp? getTimestamp(
  1. String key, {
  2. Timestamp? defaultValue,
})

Reads a key value of Timestamp type from Map.

If value is NULL or not Timestamp type return defaultValue .

Implementation

Timestamp? getTimestamp(
  String key, {
  Timestamp? defaultValue,
}) {
  if (containsKey(key) && this[key] is Timestamp) {
    return this[key];
  }
  errorLogsNS("Map.getTimeStamp[$key] has incorrect data : ${this[key]}");
  return defaultValue;
}