rrousselGit / state_notifier

ValueNotifier, but outside Flutter and with some extra perks
MIT License
311 stars 28 forks source link

Rename LocatorMixin update method's argument #2

Closed mono0926 closed 4 years ago

mono0926 commented 4 years ago

Rename LocatorMixin update method's argument to locator from watch. This is more natural isn't it?

rrousselGit commented 4 years ago

I disagree with this one.

This is done on purpose to highlight the difference with the locator property.

This is equivalent to context.read vs context.watch. The parameter of update will trigger rebuilds, whereas the property (which is disabled during update) is a simple read.

rrousselGit commented 4 years ago

I may actually rename locator to read to be clearer.

mono0926 commented 4 years ago

This is done on purpose to highlight the difference with the locator property.

Okay, I figured out, and closing now 👌