79404664

Date: 2025-02-01 08:45:38
Score: 1
Natty:
Report link

When you get 'Today' as one of the days on the list, you can set the initialDate to get the next allowed date, DateTime initialDate = selectedDate ?? DateTime.now();
while (daysOfWeek.contains(initialDate.weekday)) {
initialDate = initialDate.add(Duration(days: 1));
} and then assign the parameter with initialDate :)

Reasons:
  • Has code block (-0.5):
  • Starts with a question (0.5): When you
  • Low reputation (1):
Posted by: KAVIN RORONOA