Skip to content

hello, why it not work? i'm imitated it from example/thememode, #63

Closed Answered by nank1ro
red-co asked this question in Q&A
Discussion options

You must be logged in to vote

It's because you're mutating the number field of the class directly and not the signal.
If you change the onPressed to this it will work:

 numberProvider.update((value) => NumberProvider(value.number + 1));

In addition rename numberProvider here builder: (_, numberProvider, __) { into something else because this is the value, not the signal.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@red-co
Comment options

Answer selected by red-co
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants