availableNativeFunctionsProvider top-level property
ProviderFamily<List<DartBlockNativeFunction> , List<DartBlockDataType> >
availableNativeFunctionsProvider
final
Available native functions filtered by settings and return type
Implementation
final availableNativeFunctionsProvider =
Provider.family<List<DartBlockNativeFunction>, List<DartBlockDataType>>((
ref,
restrictToDataTypes,
) {
final settings = ref.watch(settingsProvider);
return DartBlockNativeFunctions.filter(
settings.allowedNativeFunctionCategories,
settings.allowedNativeFunctionTypes,
)
.where(
(f) =>
restrictToDataTypes.isEmpty ||
restrictToDataTypes.contains(f.returnType),
)
.toList();
});