Type constructor

Type({
  1. String? name,
  2. Iterable<Field>? fields,
  3. Iterable<String>? oneofs,
  4. Iterable<Option>? options,
  5. SourceContext? sourceContext,
  6. Syntax? syntax,
})

Implementation

factory Type({
  $core.String? name,
  $core.Iterable<Field>? fields,
  $core.Iterable<$core.String>? oneofs,
  $core.Iterable<Option>? options,
  $1.SourceContext? sourceContext,
  Syntax? syntax,
}) {
  final $result = create();
  if (name != null) {
    $result.name = name;
  }
  if (fields != null) {
    $result.fields.addAll(fields);
  }
  if (oneofs != null) {
    $result.oneofs.addAll(oneofs);
  }
  if (options != null) {
    $result.options.addAll(options);
  }
  if (sourceContext != null) {
    $result.sourceContext = sourceContext;
  }
  if (syntax != null) {
    $result.syntax = syntax;
  }
  return $result;
}