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<$2.Option>? options,
  $core.String? version,
  $0.SourceContext? sourceContext,
  $core.Iterable<Mixin>? mixins,
  $2.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;
}