Service constructor Null safety

Service(
  1. {String? id,
  2. String? type,
  3. Iterable<KeyValuePair>? serviceEndpoint}
)

Implementation

factory Service({
  $core.String? id,
  $core.String? type,
  $core.Iterable<KeyValuePair>? serviceEndpoint,
}) {
  final _result = create();
  if (id != null) {
    _result.id = id;
  }
  if (type != null) {
    _result.type = type;
  }
  if (serviceEndpoint != null) {
    _result.serviceEndpoint.addAll(serviceEndpoint);
  }
  return _result;
}