Closed jinyus closed 8 months ago
Looks like you forgot to wrap the MaterialApp
in a ContextWatchRoot
. With context_watch v2+ you'd receive an error in this case.
BTW, I'd recommend trying context_watch v2.0.0-dev.4 or later for the benchmark if possible as it should have a better performance. The only reason v2 is not released yet is that it requires a beta version of Flutter at the moment.
Looks like you forgot to wrap the
MaterialApp
in aContextWatchRoot
. With context_watch v2+ you'd receive an error in this case.
Thanks, this fixed it, I'll use v2
I made rainbench to test the throughput of different libs and I am trying to add
context_watch
but it's not working. A mutation triggers a rebuild but theValueNotifier
has the same value. It works fine withValueListenableBuilder
.Here is the code: https://github.com/jinyus/rainbench/blob/92f1742febd15cdecda5542768a1824098fe2a2f/lib/rain/value_notifier.dart#L47