Skip to content
New issue

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

The member 'AsyncNotifierProviderImpl' can only be used within 'package:riverpod/src/async_notifier/base.dart' or a test. #2871

Closed
serhii-k opened this issue Sep 2, 2023 · 0 comments
Assignees
Labels
bug Something isn't working needs triage

Comments

@serhii-k
Copy link

serhii-k commented Sep 2, 2023

Describe the bug
The generated code for the following provider triggers this warning:
warning: The member 'AsyncNotifierProviderImpl' can only be used within 'package:riverpod/src/async_notifier/base.dart' or a test. (invalid_use_of_visible_for_testing_member at ...)

To Reproduce

@Riverpod(keepAlive: true)
class Test extends _$Test {
  @override
  FutureOr<int> build(int tabId) => 0;
}

The autoDispose version (@riverpod) doesn't produce this warning.

Expected behavior
No warnings.

@serhii-k serhii-k added bug Something isn't working needs triage labels Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

2 participants