ModuleCall constructor

ModuleCall(
  1. String localName, {
  2. required String source,
  3. String? version,
  4. Map<String, TfArg?> inputs = const {},
  5. Map<String, StackProvider> providers = const {},
  6. List<TfAddressed>? dependsOn,
  7. TfArg<num>? count,
  8. TfArg<Object?>? forEach,
})

Implementation

ModuleCall(
  this.localName, {
  required this.source,
  this.version,
  Map<String, TfArg<dynamic>?> inputs = const {},
  Map<String, StackProvider> providers = const {},
  this.dependsOn,
  this.count,
  this.forEach,
}) : inputs = Map<String, TfArg<dynamic>?>.unmodifiable(inputs),
     providers = Map<String, StackProvider>.unmodifiable(providers) {
  if (localName.trim().isEmpty) {
    throw ArgumentError.value(localName, 'localName', 'must not be empty');
  }
  if (source.trim().isEmpty) {
    throw ArgumentError.value(source, 'source', 'must not be empty');
  }
  for (final name in this.inputs.keys) {
    if (reservedInputNames.contains(name)) {
      throw ArgumentError.value(
        name,
        'inputs',
        'is a module meta-argument, not an input; pass it as the '
            'matching `ModuleCall` parameter',
      );
    }
  }
}