table_calendar icon indicating copy to clipboard operation
table_calendar copied to clipboard

[Feature] DaysOfweekStyle supports daysOfWeekStyleBuilder

Open GeekTree0101 opened this issue 11 months ago • 0 comments
trafficstars

Some calendar services mark Saturday in blue and Sunday in red. So I suggest adding DaysOfWeekStyleBuilder to the DaysOfWeekStyle class

Usecase

daysOfWeekStyle: DaysOfWeekStyle(
  daysOfWeekStyleBuilder: (context, day) {
    if (day.weekday == DateTime.sunday) {
      return TextStyle(
        fontWeight: FontWeight.bold,
        color:  Colors.red,
      );
    } else if (day.weekday == DateTime.saturday) {
      return TextStyle(
        fontWeight: FontWeight.bold,
        color: Colors.blue,
      );
    } else {
      return TextStyle(
        fontWeight: FontWeight.bold,
        color: Colors.grey,
      );
    }
  },
)

Screenshot

스크린샷 2024-12-11 오전 9 44 25

GeekTree0101 avatar Dec 11 '24 00:12 GeekTree0101