isTomorrow property
bool
get
isTomorrow
Returns true
if the given date is tomorrow.
Example:
DateTime tomorrow = DateTime.now().add(Duration(days: 1));
print(tomorrow.isTomorrow); // Output: true
Implementation
bool get isTomorrow {
if (isNull) {
return false;
}
final nowDate = DateTime.now();
return year == nowDate.year &&
month == nowDate.month &&
day == nowDate.day + 1;
}