onChanged property
Called when the user taps on a day.
The selector passes the day value as per the DateTime weekday constants to the callback: DateTime.monday is 1, DateTime.tuesday is 2, ..., and DateTime.sunday is 7.
The callback provided to onChanged could update the state of the parent [StatefulWidget[ using the State.setState method (or use your favorite state management library) so that the parent gets rebuilt.
Implementation
final ValueChanged<int>? onChanged;