unixToDateTime function Null safety
- int? data
Implementation
DateTime? unixToDateTime(int? data) {
if (data == null) return null;
final int millis = data * 1000;
return DateTime.fromMillisecondsSinceEpoch(millis);
}
DateTime? unixToDateTime(int? data) {
if (data == null) return null;
final int millis = data * 1000;
return DateTime.fromMillisecondsSinceEpoch(millis);
}