computedContainer<T, Arg> function
Create a signal container for computed signals based on args.
final container = computedContainer<int, int>((arg) {
return computed(() => sourceSignal.value * arg);
});
Implementation
SignalContainer<T, Arg, Computed<T>> computedContainer<T, Arg>(
Computed<T> Function(Arg) create, {
bool cache = false,
void Function(Arg key, Computed<T> signal)? onEvict,
}) {
return SignalContainer<T, Arg, Computed<T>>(
create,
cache: cache,
onEvict: onEvict,
);
}