VSListNode constructor

VSListNode({
  1. String? id,
  2. required String type,
  3. required Offset widgetOffset,
  4. required VSInputData inputBuilder(
    1. int index,
    2. VSOutputData? connection
    ),
  5. required Iterable<VSOutputData> outputData,
  6. double? nodeWidth,
  7. String? title,
  8. String? toolTip,
  9. dynamic onUpdatedConnection(
    1. VSInputData interfaceData
    )?,
  10. VSOutputData? referenceConnection,
})

List Node

Can be used to add a node that bundles multiple inputs into one output

Implementation

VSListNode({
  String? id,
  required String type,
  required Offset widgetOffset,
  required this.inputBuilder,
  required Iterable<VSOutputData> outputData,
  double? nodeWidth,
  String? title,
  String? toolTip,
  Function(VSInputData interfaceData)? onUpdatedConnection,

  ///Can be used to set the initial connection of the first created input
  VSOutputData? referenceConnection,
}) : super(
        id: id,
        type: type,
        widgetOffset: widgetOffset,
        inputData: [
          inputBuilder(0, null)..connectedInterface = referenceConnection,
        ],
        outputData: outputData,
        nodeWidth: nodeWidth,
        title: title,
        toolTip: toolTip,
        onUpdatedConnection: onUpdatedConnection,
      ) {
  if (inputData.first.connectedInterface != null) {
    _setInputs([inputData.first.connectedInterface]);
  }
}