riverpod icon indicating copy to clipboard operation
riverpod copied to clipboard

Immediately call `ref.onCancel` after the initialization of a provider if it isn't currently listened

Open rrousselGit opened this issue 1 year ago • 1 comments

Currently, calling ref.read on a provider that isn't listened yet (no ref.watch/listen) does not trigger ref.onCancel. Yet at the same time, that provider is considered to be paused, as it isn't currently in use.

This issue is about fixing the inconsistency, and invoking ref.onCancel listeners if the provider is initialized but not listened

rrousselGit avatar Sep 21 '22 19:09 rrousselGit