isDateMills function
checks if the input is a valid date
to parse by DateTime.fromMillisecondsSinceEpoch
factory
Implementation
bool isDateMills(String v, {bool isUtc = false}) {
try {
if (!(int.tryParse(v) != null)) return false;
DateTime.fromMillisecondsSinceEpoch(
int.tryParse(v) ?? -1,
isUtc: isUtc,
);
return true;
} catch (e) {
return false;
}
}