state_notifier icon indicating copy to clipboard operation
state_notifier copied to clipboard

StateNotifierProvider.value doesn't handle LocatorMixin

Open jaumard opened this issue 1 year ago • 0 comments

Describe the bug By using this:

StateNotifierProvider<BalanceStore, BalanceState>(create: (_) => BalanceStore()),

I can use read methods of locatorMixin.

But using:

StateNotifierProvider<BalanceStore, BalanceState>.value(balanceStore),

Then read crash with not found dependency.

By reading the source look like one is setting (value as LocatorMixin)..read = _contextToLocator(context) but it is not done on the other case.

jaumard avatar Dec 14 '22 13:12 jaumard