availableCustomFunctionsProvider top-level property
ProviderFamily<List<DartBlockCustomFunction> , List<DartBlockDataType> >
availableCustomFunctionsProvider
final
Available custom functions filtered by return type restrictions
Implementation
final availableCustomFunctionsProvider =
Provider.family<List<DartBlockCustomFunction>, List<DartBlockDataType>>((
ref,
restrictToDataTypes,
) {
return ref
.watch(programProvider)
.customFunctions
.where(
(f) =>
restrictToDataTypes.isEmpty ||
restrictToDataTypes.contains(f.returnType),
)
.toList();
});