Closed PaulHalliday closed 3 days ago
The biggest difference is that Watch will rebuild for inherited widgets listened instead the callback (theme/media) and is an effect.
.watch calls the subscribe method for a specific signal.
That being said I am very interested and will see if we can get some tests added to make sure they are aligned as much as possible (inherited widgets will rebuild a lot more outside of my control).
Could you share a minimal example for reference?
I've been using
signals
/lite_ref
in my project, and part of my implementation relies on overriding a scoped dependency to provide demo data for a "preview" mode of a particular set of widgets.I ran into an issue where I had to replace my
Watch
for.watch(context)
as it did not work correctly otherwise:https://github.com/jinyus/lite_ref/issues/24
As I figured that
Watch
and.watch(context)
were interchangeable (and especially considering the docs suggest usingWatch
over.watch(context)
), are there any other/specific scenarios where this is expected?