Explanation on new parameters of listener in ref.listen? #926
-
Hi, Is there an explanation somewhere about the nullable and non-nullable parameters in the new version of void listen<T>(
ProviderListenable<T> provider,
void Function(T?, T) listener, {
void Function(Object, StackTrace)? onError,
}) Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The first parameter is the previous value and the second is the current value of the listened provider. |
Beta Was this translation helpful? Give feedback.
-
Shouldn't the Documentation get updated? final anotherProvider = Provider((ref) { |
Beta Was this translation helpful? Give feedback.
The first parameter is the previous value and the second is the current value of the listened provider.