getDateFromTimestamp function
Implementation
DateTime? getDateFromTimestamp(dynamic timestamp) {
if (timestamp is int) {
return DateTime.fromMicrosecondsSinceEpoch(timestamp);
} else if (timestamp is String) {
return DateTime.parse(timestamp);
} else {
return null;
}
}