create static method

RecurrenceDateProperty? create(
  1. String propertyName,
  2. List<DateTimeOrDuration>? value
)

Implementation

static RecurrenceDateProperty? create(
    String propertyName, List<DateTimeOrDuration>? value) {
  if (value == null) {
    return null;
  }
  if (value.isEmpty) {
    throw FormatException('Unable to set empty $propertyName');
  }
  if (value.first.duration != null) {
    propertyName += ';VALUE=DURATION';
  }

  return RecurrenceDateProperty('$propertyName:${value.join(',')}');
}