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
Describe the bug
The following code no one listen Counter's change, but print(context.read().hasListeners1) still output true.
To Reproduce
import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class Counter with ChangeNotifier { int value = 0; bool get hasListeners1 => hasListeners; } void main() { runApp( ChangeNotifierProvider( create: (context) => Counter(), builder: (context, child) { print(context.read<Counter>().hasListeners1); return Container(); }, ), ); }
Expected behavior In the code above, print(context.read().hasListeners1) should output false.
Thanks!
The text was updated successfully, but these errors were encountered:
There is a listener. The provider package is listening to the ChangeNotifier. That's not possible to change
Sorry, something went wrong.
rrousselGit
No branches or pull requests
Describe the bug
The following code no one listen Counter's change, but print(context.read().hasListeners1) still output true.
To Reproduce
Expected behavior
In the code above, print(context.read().hasListeners1) should output false.
Thanks!
The text was updated successfully, but these errors were encountered: