listenSelf method
RemoveListener
listenSelf(
- void listener(), {
- void onError(
- Object error,
- StackTrace stackTrace
inherited
Listens to changes on the value exposed by this provider.
The listener will be called immediately after the provider completes building.
As opposed to Ref.listen, the listener will be called even if
updateShouldNotify returns false, meaning that the previous
and new value can potentially be identical.
Returns a function which can be called to remove the listener.
Implementation
@protected
RemoveListener listenSelf(
void Function(StateT? previous, StateT next) listener, {
void Function(Object error, StackTrace stackTrace)? onError,
}) {
return $ref.listenSelf(listener, onError: onError);
}