FunctionCallComposer constructor
FunctionCallComposer({
- Key? key,
- required List<
DartBlockFunction> customFunctions, - required List<
DartBlockVariableDefinition> existingVariableDefinitions, - FunctionCallStatement? statement,
- dynamic onSaved(
- DartBlockFunction customFunction,
- FunctionCallStatement functionCallStatement
- dynamic onChange(
- DartBlockFunction customFunction,
- FunctionCallStatement newFunctionCallStatement
- required List<
DartBlockDataType> restrictToDataTypes, - bool showArgumentEditorAsModalBottomSheet = false,
- 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;