onLongPress property

CalendarLongPressCallback? onLongPress
final

Called whenever the SfCalendar elements long pressed on view.

The long-pressed date, appointments, and element details when the long-press action performed on element available in the CalendarLongPressDetails.

see also:


return Container(
     child: SfCalendar(
       view: CalendarView.week,
       onLongPress: (CalendarLongPressDetails details){
         DateTime date = details.date!;
         dynamic appointments = details.appointments;
         CalendarElement view = details.targetElement;
       },
     ),
   );
 }

Implementation

final CalendarLongPressCallback? onLongPress;