isToday property

bool get isToday

Returns true if this date is today.

Example:

final today = DateTime.now();
final check = today.isToday;
// returns: true

Implementation

bool get isToday {
  final now = DateTime.now();
  return year == now.year && month == now.month && day == now.day;
}