allowDragAndDrop property
Allows to drag and drop the appointment, to reschedule this into new date time.
Defaults to false.
See also:
- allowAppointmentResize, which allows to resize the appointment to reschedule.
- dragAndDropSettings, which allows to customize the drag and drop environment.
Note: This doesn't applicable when the view set as CalendarView.schedule. This doesn't applicable when the view set as CalendarView.month and CalendarView.timelineMonth in mobile layout.
This method must be implemented to get the data with business object type when drag and drop or appointment resizing enabled.
Widget build(BuildContext context) {
return Scaffold(
body: SfCalendar(
view: CalendarView.month,
showWeekNumber: true,
allowDragAndDrop: true,
dragAndDropSettings: DragAndDropSettings(
allowNavigation: true,
allowScroll: true,
autoNavigateDelay: Duration(seconds: 1),
indicatorTimeFormat: 'HH:mm a',
showTimeIndicator: true,
),
),
);
}
Implementation
final bool allowDragAndDrop;