dateTime method
Implementation
DateTime? dateTime(String key) {
if (containsKey(key)) {
if (this[key] is String) {
String str = this[key];
if (str.length > 10 && !str.contains('Z') && !str.contains('+')) {
str += 'Z';
}
return DateTime.parse(str).toLocal();
}
if (this[key] == null) {
return DateTime.fromMillisecondsSinceEpoch(0);
}
}
return null;
}