Closed subzero911 closed 10 months ago
@subzero911
This is because showUnseen
is not an Observable
. If showUnseen
is false
, conditions after &&
are not checked.
style: false && store.viewedAt.value != null // store.viewedAt.value is not used
? const TextStyle()
: const TextStyle()
style: showUnseen && store.viewedAt.value != null
-> style: store.viewedAt.value != null && showUnseen
I use an Observer like this:
Where
viewedAt
is an Observable inside a Task model:But Observer can't see it for some reason:
This error disappears though, if I do reading right in the Observer body:
Why is this line
style: task.viewedAt.value == null ? styleA : styleB
treated like a non-immediate context execution? Does a ternary operator implicitly unfolds into the anonymous function by the compiler?