dateOnly method Null safety
- DateTime date
Returns a DateTime with the date of the original, but time set to midnight.
Implementation
static DateTime dateOnly(DateTime date) {
return DateTime(date.year, date.month, date.day);
}
Returns a DateTime with the date of the original, but time set to midnight.
static DateTime dateOnly(DateTime date) {
return DateTime(date.year, date.month, date.day);
}