checkAfter method
Implementation
bool checkAfter({required DateTime target}) {
bool checkYear = false;
bool checkMonth = false;
bool checkDay = false;
// startDate < targetDate
if (this.year == target.year) {
checkYear = true;
if (this.month == target.month) {
checkMonth = true;
if (this.day > target.day) {
checkDay = false;
} else {
checkDay = true;
}
} else if (this.month < target.month) {
checkMonth = true;
checkDay = true;
}
} else if (this.year < target.year) {
checkYear = true;
checkMonth = true;
checkDay = true;
}
return checkYear && checkMonth && checkDay;
}