Closed tdomarkas closed 3 months ago
It should still be the case. It should only be removed for value signal.
I'll double check on the code and documentation
I can confirm on 4.5.1 that previousValue
doesn't exist in the above case as per the documentation.
final counter = signal(0);
effect(() {
print('Current value: ${counter.value}');
print('Previous value: ${counter.previousValue}');
});
counter.value = 1;
---
The getter 'previousValue' isn't defined for the type 'Signal<int>'.
Try importing the library that defines 'previousValue', correcting the name to the name of an existing getter, or defining a getter or field named 'previousValue'.
Ah it is because I moved it to TrackedReadonlySignal
and Signal
does not expose it.
Just an interface issue, will fix it!
Will be fixed on the next release!
Added an error via mixin for the value signals on the latest beta
Code provided on https://github.com/rodydavis/signals.dart/blob/main/website/src/content/docs/dart/core/signal.md#previousvalue doesn't work as "previousValue" does not exist.
Is this just outdated documentation issue?