Replies: 3 comments 4 replies
-
I don't understand what this means. You should be able to make your statenotifierprovider use autoDispose without issue |
Beta Was this translation helpful? Give feedback.
-
|
@ebelevics You should change your |
Beta Was this translation helpful? Give feedback.
-
|
Answered |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have WebSocket which is tied to
final wsProvider = StreamProvider.autoDispose<WSMessage>. Then I haveauthProvider = StateNotifierProviderwhich is not autodisposed, because I need to listen to user authentication state all the time.I have come to problem that I can't listen to wsProvider inside of authProvider's StateNotifier with Ref because of ``The argument type 'AutoDisposeStreamProvider' can't be assigned to the parameter type 'AlwaysAliveProviderListenable'.`
I also can't use AutoDisposeRef because both providers have different dispose logic. Only by changing wsProvider to normal SteamProvider will remove the error, but this is not expected usecase, as WS should dispose and reinstantiate for each a user during login/logout. Also because wsProvider is listened in other autodisposed providers.
How can I solve this issue?
Beta Was this translation helpful? Give feedback.
All reactions