allowedViews property
The list of CalendarViews that should be displayed in the header for quick navigation.
Defaults to null.
See also:
- SfCalendar.onViewChanged, the callback to notify that the view changed, this also contains the visible dates collection.
- view, to specify the view to be rendered on initially in calendar.
- CalendarController.view, to change the calendar view dynamically.
- Knowledge base: How to do date navigates easily
Widget build(BuildContext context) {
return Container(
child: SfCalendar(
view: CalendarView.day,
allowedViews: [ CalendarView.day,
CalendarView.week,
CalendarView.month,
CalendarView.schedule
],
),
);
}
Implementation
final List<CalendarView>? allowedViews;