FunctionCallComposer constructor

FunctionCallComposer({
  1. Key? key,
  2. required List<DartBlockFunction> customFunctions,
  3. required List<DartBlockVariableDefinition> existingVariableDefinitions,
  4. FunctionCallStatement? statement,
  5. dynamic onSaved(
    1. DartBlockFunction customFunction,
    2. FunctionCallStatement functionCallStatement
    )?,
  6. dynamic onChange(
    1. DartBlockFunction customFunction,
    2. FunctionCallStatement newFunctionCallStatement
    )?,
  7. required List<DartBlockDataType> restrictToDataTypes,
  8. bool showArgumentEditorAsModalBottomSheet = false,
  9. bool autoSelectDefaultFunction = true,
})

Implementation

FunctionCallComposer({
  super.key,
  required List<DartBlockFunction> customFunctions,
  required this.existingVariableDefinitions,
  this.statement,
  this.onSaved,
  this.onChange,
  required this.restrictToDataTypes,
  this.showArgumentEditorAsModalBottomSheet = false,
  this.autoSelectDefaultFunction = true,
}) : customFunctions = restrictToDataTypes.isNotEmpty
         ? customFunctions
               .where(
                 (element) =>
                     restrictToDataTypes.contains(element.returnType),
               )
               .toList()
         : customFunctions;