showTrailingAndLeadingDates property Null safety

bool showTrailingAndLeadingDates
final

Makes the leading and trailing dates visible for the SfCalendar month view.

Defaults to true.

Note: Leading and trailing dates are not visible when the showTrailingAndLeadingDates value is false and the showTrailingAndLeadingDates only applies when the numberOfWeeksInView is 6.

Styling of the trailing and leading dates can be handled using the MonthCellStyle.leadingDatesTextStyle and MonthCellStyle.trailingDatesTextStyle properties in MonthCellStyle.

See also:

  • numberOfWeeksInView, which allows to customize the displaying week count in month view of calendar.
  • monthCellStyle.leadingDatesBackgroundColor, which fills the background of the leading dates cell in month view of calendar.
  • monthCellStyle.leadingDatesTextStyle, which is the style for the leading dates text in month view of calendar.
  • monthCellStyle.trailingDatesBackgroundColor, which fills the background of the trailing dates cell in month view of calendar.
  • monthCellStyle.trailingDatesTextStyle, which is the style for the trailing dates text in month view of calendar.
  • Knowledge base: How to customize the leading and trailing dates
  • Knowledge base: How to style the month cell
  • Knowledge base: How to change the number of weeks
Widget build(BuildContext context) {
return Container(
   child: SfCalendar(
     view: CalendarView.month,
     monthViewSettings: MonthViewSettings(
         showTrailingAndLeadingDates: false,
        ),
     ),
   );
}

Implementation

final bool showTrailingAndLeadingDates;