Api constructor
Api({})
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;
}