Unverified Commit 3c8dabef authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Be more explicit when ValueNotifier notifies (#30461)

parent 952e307d
...@@ -248,14 +248,18 @@ class _MergingListenable extends Listenable { ...@@ -248,14 +248,18 @@ class _MergingListenable extends Listenable {
/// A [ChangeNotifier] that holds a single value. /// A [ChangeNotifier] that holds a single value.
/// ///
/// When [value] is replaced, this class notifies its listeners. /// When [value] is replaced with something that is not equal to the old
/// value as evaluated by the equality operator ==, this class notifies its
/// listeners.
class ValueNotifier<T> extends ChangeNotifier implements ValueListenable<T> { class ValueNotifier<T> extends ChangeNotifier implements ValueListenable<T> {
/// Creates a [ChangeNotifier] that wraps this value. /// Creates a [ChangeNotifier] that wraps this value.
ValueNotifier(this._value); ValueNotifier(this._value);
/// The current value stored in this notifier. /// The current value stored in this notifier.
/// ///
/// When the value is replaced, this class notifies its listeners. /// When the value is replaced with something that is not equal to the old
/// value as evaluated by the equality operator ==, this class notifies its
/// listeners.
@override @override
T get value => _value; T get value => _value;
T _value; T _value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment