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

context.read CAN be called within build method #848

Closed
Albert221 opened this issue Nov 24, 2023 · 1 comment
Closed

context.read CAN be called within build method #848

Albert221 opened this issue Nov 24, 2023 · 1 comment
Assignees
Labels
documentation An opportunity for improving the documentation needs triage

Comments

@Albert221
Copy link

README and context.read Dartdocs state the following:

It's worth noting that context.read() won't make a widget rebuild when the value changes and it cannot be called inside StatelessWidget.build/State.build. On the other hand, it can be freely called outside of these methods.

I bolded out the part I don't like. This is not true. Is it about good practices? It should be pointed out as such then, not that it cannot be called, because it can

@Albert221 Albert221 added documentation An opportunity for improving the documentation needs triage labels Nov 24, 2023
@Albert221
Copy link
Author

README of provider still has the mentioned phrasing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation An opportunity for improving the documentation needs triage
Projects
None yet
Development

No branches or pull requests

2 participants