Api constructor

Api({
  1. String? name,
  2. Iterable<Method>? methods,
  3. Iterable<Option>? options,
  4. String? version,
  5. SourceContext? sourceContext,
  6. Iterable<Mixin>? mixins,
  7. Syntax? syntax,
})

Implementation

factory Api({
  $core.String? name,
  $core.Iterable<Method>? methods,
  $core.Iterable<$3.Option>? options,
  $core.String? version,
  $1.SourceContext? sourceContext,
  $core.Iterable<Mixin>? mixins,
  $3.Syntax? syntax,
}) {
  final $result = create();
  if (name != null) {
    $result.name = name;
  }
  if (methods != null) {
    $result.methods.addAll(methods);
  }
  if (options != null) {
    $result.options.addAll(options);
  }
  if (version != null) {
    $result.version = version;
  }
  if (sourceContext != null) {
    $result.sourceContext = sourceContext;
  }
  if (mixins != null) {
    $result.mixins.addAll(mixins);
  }
  if (syntax != null) {
    $result.syntax = syntax;
  }
  return $result;
}