allowedViews property Null safety

List<CalendarView>? allowedViews
final

The list of CalendarViews that should be displayed in the header for quick navigation.

Defaults to null.

See also: SfCalendar.onViewChanged

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;