convertToDateTime method
Implementation
DateTime? convertToDateTime() {
if (this != null) {
int hr = this!.inHours > 0 ? this!.inHours : 0,
min = this!.inMinutes.remainder(60),
sec = this!.inSeconds.remainder(60),
milSec = this!.inMilliseconds.remainder(1000);
return DateTime(0, 0, 0, hr, min, sec, milSec, 0);
} else {
debugPrint("the Duration to convert to DateTime is NULL");
return null;
}
}