onDragStart property
Called whenever the appointment starts to drag in the SfCalendar.
The callback arguments contains the dragging appointment and associated resource details.
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,
),
onDragStart: (AppointmentDragStartDetails details) {
dynamic appointment = details.appointment!;
CalendarResource? resource = details.resource;
}),
);
}
Implementation
final AppointmentDragStartCallback? onDragStart;