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