sources property
Returns the list of source Reactive instances that this computed value depends on.
This getter provides access to the source reactives passed in the constructor. It's primarily used internally for implementing memoization and by the memoize function.
Example:
final name = Reactive('John');
final greeting = Computed([name], (sources) => 'Hello, ${sources[0].value}!');
final sources = greeting.sources;
print(sources.length); // 1
print(sources[0].value); // "John"
See also:
- memoize: A function that creates a memoized version of a computed value.
Implementation
List<Reactive<dynamic>> get sources => _sources;