monthCellBuilder property
A builder that builds a widget, replaces the month cell in the calendar month view.
See also:
- MonthViewSettings.appointmentDisplayMode, to customize the appointment display mode in the month cell.
- appointmentBuilder, to build custom widget for appointments in calendar.
- Knowledge base: How to customize month cells
- Knowledge base: How to customize month cell with appointment count
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: SfCalendar(
view: CalendarView.month,
monthCellBuilder:
(BuildContext buildContext, MonthCellDetails details) {
return Container(
color: Colors.red,
child: Text(
details.date.day.toString(),
),
);
},
)));
}
Implementation
final MonthCellBuilder? monthCellBuilder;