I am quite new to this framework and working on state management using provider package where I come across ChangeNotifierProvider
and ChangeNotifierProvi
Does the official documentation help?
DO use ChangeNotifierProvider.value to provider an existing
ChangeNotifier
:
ChangeNotifierProvider.value(
value: variable,
child: ...
)
DON'T reuse an existing
ChangeNotifier
using the default constructor.
ChangeNotifierProvider(
builder: (_) => variable,
child: ...
)
Also check out this Github issue from the author about this.