We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ProviderContainer.exists
Describe the bug ProviderContainer.exists doesn't ask parent
To Reproduce
import 'package:riverpod/riverpod.dart'; final testProvider = Provider((ref) => 1); void main() { final rootContainer = ProviderContainer(); print(rootContainer.exists(testProvider)); // false print(rootContainer.read(testProvider)); // 1 print(rootContainer.exists(testProvider)); // true final childContainer = ProviderContainer( parent: rootContainer, ); print(childContainer.exists(testProvider)); // false print(childContainer.read(testProvider)); // true print(childContainer.exists(testProvider)); // false }
Expected behavior Must ask parent
The text was updated successfully, but these errors were encountered:
Added scenario: This should handle provider overrides. If a provider is overridden by a container, then the container should no-longer ask the parent
Sorry, something went wrong.
Fix infinite loop due to keepAlive
1c33f39
Fix ref.exists not checking ancestor containers. fixes #2177 fixes #2044
Fix infinite loop due to keepAlive (#3158)
dc5b34d
rrousselGit
Successfully merging a pull request may close this issue.
Describe the bug
ProviderContainer.exists
doesn't ask parentTo Reproduce
Expected behavior
Must ask parent
The text was updated successfully, but these errors were encountered: