copyWith method

TimeRegion copyWith({
  1. DateTime? startTime,
  2. DateTime? endTime,
  3. String? text,
  4. String? recurrenceRule,
  5. Color? color,
  6. bool? enablePointerInteraction,
  7. List<DateTime>? recurrenceExceptionDates,
  8. String? timeZone,
  9. IconData? iconData,
  10. TextStyle? textStyle,
  11. List<Object>? resourceIds,
})

Creates a copy of this TimeRegion but with the given fields replaced with the new values.

Implementation

TimeRegion copyWith(
    {DateTime? startTime,
    DateTime? endTime,
    String? text,
    String? recurrenceRule,
    Color? color,
    bool? enablePointerInteraction,
    List<DateTime>? recurrenceExceptionDates,
    String? timeZone,
    IconData? iconData,
    TextStyle? textStyle,
    List<Object>? resourceIds}) {
  return TimeRegion(
      startTime: startTime ?? this.startTime,
      endTime: endTime ?? this.endTime,
      color: color ?? this.color,
      recurrenceRule: recurrenceRule ?? this.recurrenceRule,
      textStyle: textStyle ?? this.textStyle,
      enablePointerInteraction:
          enablePointerInteraction ?? this.enablePointerInteraction,
      recurrenceExceptionDates:
          recurrenceExceptionDates ?? this.recurrenceExceptionDates,
      text: text ?? this.text,
      iconData: iconData ?? this.iconData,
      timeZone: timeZone ?? this.timeZone,
      resourceIds: resourceIds ?? this.resourceIds);
}