rrousselGit / provider

InheritedWidgets, but simple
https://pub.dev/packages/provider
MIT License
5.1k stars 509 forks source link

context.read CAN be called within build method #848

Closed Albert221 closed 9 months ago

Albert221 commented 9 months ago

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 commented 9 months ago

README of provider still has the mentioned phrasing.