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