-
Notifications
You must be signed in to change notification settings - Fork 75
Open
Labels
questionFurther information is requestedFurther information is requested
Description
there's another weird behaviour i have found when using signals in such way
so i have declared my signals as usual
final selectedPostSignal = signal<SelectedPost?>(null);and in my widget down below i'm using
Watch.builder(
builder: (_){
return Column(
children: [
SomeWidget(),
SomeOtherWidget(),
if (selectedPostSignal.value?.id == post.id)
PostDetails(post: post),
],
)
}
)if i did this it would never work and never rebuild if somewhere else i changed selectedPostSignal
i have to assign it to a variable to work
Watch.builder(
builder: (_){
final selectedPost = selectedPostSignal.value;
return Column(
children: [
SomeWidget(),
SomeOtherWidget(),
if (selectedPost?.id == post.id)
PostDetails(post: post),
],
)
}
)and volla!, magically it works.
please validate this with me rody, if that's a malpractice of me.
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested