toDateTime function
Implementation
DateTime? toDateTime(value) {
if (value == null) return null;
if (value is String) return DateTime.parse(value);
if (value is int) return DateTime.fromMillisecondsSinceEpoch(value);
return null;
}
DateTime? toDateTime(value) {
if (value == null) return null;
if (value is String) return DateTime.parse(value);
if (value is int) return DateTime.fromMillisecondsSinceEpoch(value);
return null;
}