Category / Section
How to restrict the view navigation in the Flutter Calendar
In the Flutter Event Calendar, you can restrict the view navigation by setting the viewNavigationMode property to ViewNavigationMode.none.
child: Column(
children: [
Container(
child: TextButton(
child: Text('Restrict view navigation'),
onPressed: () {
setState(() {
_viewNavigationMode = ViewNavigationMode.none;
});
},
),
),
Expanded(
child: SafeArea(
child: SfCalendar(
view: CalendarView.day,
allowedViews: [
CalendarView.day,
CalendarView.week,
CalendarView.workWeek,
CalendarView.month,
CalendarView.timelineDay,
CalendarView.timelineWeek,
CalendarView.timelineWorkWeek,
CalendarView.timelineMonth,
],
dataSource: _getCalendarDataSource(),
viewNavigationMode: _viewNavigationMode,
)),
)
],
),
|
