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;
}