To customize the MonthView without a full theme override, use monthViewThemeSettings. For complete control over how individual date cells are rendered, use monthViewBuilders.cellBuilder.
Key customization options:
monthViewThemeSettings: Adjust selectedHighlightColor, selectedTitleColor, cellsInMonthHighlightColor, and weekDayTextStyle.monthViewBuilders.cellBuilder: A builder function that provides context for each cell, including date, events, isToday, isInMonth, isSelected, and hideDaysNotInMonth.
MonthView(
monthViewThemeSettings: MonthViewThemeSettings(
selectedHighlightColor: Colors.blue,
selectedTitleColor: Colors.white,
cellsInMonthHighlightColor: Colors.blue,
weekDayTextStyle: TextStyle(color: Colors.black, fontWeight: FontWeight.bold),
),
monthViewBuilders: MonthViewBuilders(
cellBuilder: (date, events, isToday, isInMonth, isSelected, hideDaysNotInMonth) {
return Container(
decoration: BoxDecoration(
color: isInMonth ? Colors.white : Colors.grey[200],
border: Border.all(color: Colors.blue),
),
child: Center(
child: Text(
date.day.toString(),
style: TextStyle(
color: isSelected ? Colors.white : (isToday ? Colors.red : Colors.black),
fontWeight: (isToday || isSelected) ? FontWeight.bold : FontWeight.normal,
),
),
),
);
},
),
)