dynamicToDateTime static method
Implementation
static DateTime? dynamicToDateTime(dynamic value) {
try {
if (value is String) return DateTime.parse(value);
if (value is int) return DateTime.fromMillisecondsSinceEpoch(value);
} catch (_) {}
return null;
}