create static method

OrganizerProperty? create({
  1. String? email,
  2. Uri? uri,
  3. Uri? sentBy,
  4. String? sentByEmail,
  5. String? commonName,
})
override

Creates a new OrganizerProperty

Implementation

static OrganizerProperty? create({
  String? email,
  Uri? uri,
  Uri? sentBy,
  String? sentByEmail,
  String? commonName,
}) {
  if (email == null && uri == null) {
    return null;
  }
  uri ??= Uri.parse('mailto:$email');
  final prop = OrganizerProperty('$propertyName:$uri');
  if (sentByEmail != null) {
    sentBy = Uri.parse('mailto:$sentByEmail');
  }
  if (sentBy != null) {
    prop[ParameterType.sentBy] =
        UriParameter.value(ParameterType.sentBy.typeName ?? '', sentBy);
  }
  if (commonName != null) {
    prop.commonName = commonName;
  }

  return prop;
}