enablePointerInteraction property

bool enablePointerInteraction
final

Used to allow or restrict the interaction of TimeRegion.

Note: This property only restrict the interaction on region and it does not restrict the following

  1. Programmatic selection(if user update the selected date value dynamically)
  2. Does not clear the selection when user select the region and dynamically change the enablePointerInteraction property to false.
  3. It does not restrict appointment interaction when the appointment placed in the region.
  4. It does not restrict the appointment rendering on specified region

See also:

 Widget build(BuildContext context) {
   return Container(
     child: SfCalendar(
       view: CalendarView.week,
       specialRegions: _getTimeRegions(),
     ),
   );
 }

 List<TimeRegion> _getTimeRegions() {
   final List<TimeRegion> regions = <TimeRegion>[];
   regions.add(TimeRegion(
       startTime: DateTime.now(),
       endTime: DateTime.now().add(Duration(hours: 1)),
       enablePointerInteraction: false,
       color: Colors.grey.withOpacity(0.2),
       text: 'Break'));

   return regions;
 }

Implementation

final bool enablePointerInteraction;