Closed Amir-P closed 1 year ago
An alternative might be to remove that debugState ... and instead mark state
with its setter as @visibleForTesting
instead of @protected
We're deprecate debugState for now to avoid a breaking change
We're deprecate debugState for now to avoid a breaking change
I can't see the deprecated annotation but that's better. I will change it.
Merging #76 (cf81c6e) into master (7783bd3) will not change coverage. The diff coverage is
n/a
.
While we're at it, I'll make this the v1.0.0 version. Enjoy :D
While we're at it, I'll make this the v1.0.0 version. Enjoy :D
If I knew it was going to be v1, I would suggest completely removing debugState
instead of deprecating. Anyway, I'll try to update riverpod
today.
I've removed debugState on mt own :)
I've already updated Riverpod too
This PR adds
debugState
setter which changesstate
when in debug mode. This is essential when testing aStateNotifier
and you want to provide a seed state. It becomes much easier to simulate different scenarios.Also, isn't it better to annotate both
debugState
getter and setter with@visibleForTesting
?