recurrenceRule property
Used to specify the recurrence of TimeRegion. It used to recur the TimeRegion and it value like 'FREQ=DAILY;INTERVAL=1'
Defaults to null.
See also;
- RecurrenceProperties, which used to create the recurrence rule based on the values set to these properties.
- SfCalendar.generateRRule, which used to generate recurrence rule based on the RecurrenceProperties values.
- SfCalendar.getRecurrenceDateTimeCollection, to get the recurrence date time collection based on the given recurrence rule and start date.
- Knowledge base: How to use a negative value for bysetpos in rrule
- Knowledge base: How to get the recurrence date collection
- Knowledge base: How to use multiple recurrence rule in special region
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,
timeZone: 'Eastern Standard Time',
recurrenceRule: 'FREQ=DAILY;INTERVAL=1',
textStyle: TextStyle(color: Colors.black45, fontSize: 15),
color: Colors.grey.withOpacity(0.2),
text: 'Break'));
return regions;
}
Implementation
final String? recurrenceRule;