I use a provider inside of another provider using that declaration
ChangeNotifierProxyProvider<Auth, Sali>(
update: (ctx, auth, prevData) => Sali(
auth.token, auth.userId, prevData == null ? [] : prevData.sali),
),
but I need to use 2 providers inside another so I tried:
ChangeNotifierProxyProvider<Auth,Mese, Sali>(
update: (ctx, auth,mes, prevData) => Sali(
auth.token, auth.userId, prevData == null ? [] : prevData.sali),
but got this error:
"The type 'ChangeNotifierProxyProvider' is declared with 2 type parameters, but 3 type arguments were given.
thanks
mrapi, I haven't used ChangeNotifierProxyProvider
but have you tried ChangeNotifierProxyProvider2. Looking at the documentation, i think it takes 3 parameters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With