notifyIfChanged<U> method
- @protected
- U transform()
Notify if transform
changed the value such that shouldNotify returns true
If the value is guaranteed to change, use notify instead
Implementation
@protected
U notifyIfChanged<U>(U Function() transform) {
final old = copyValue();
final result = transform();
if (shouldNotify(old)) {
notify();
}
return result;
}