findNextDayOfWeek method
- int weekday
Returns the next day of the week from the given date.
Implementation
date findNextDayOfWeek(int weekday) {
int daysDifference = weekday - this.weekday;
if (daysDifference <= 0) {
daysDifference += 7;
}
return add(Duration(days: daysDifference));
}