dateTimeOf function
Implementation
DateTime? dateTimeOf(json) {
if (json == null) return null;
if (json is num) {
DateTime.fromMillisecondsSinceEpoch(json.toInt(), isUtc: true);
} else {
return DateTime.parse(json.toString());
}
}
DateTime? dateTimeOf(json) {
if (json == null) return null;
if (json is num) {
DateTime.fromMillisecondsSinceEpoch(json.toInt(), isUtc: true);
} else {
return DateTime.parse(json.toString());
}
}