The type of 'xProvider' can't be inferred because it depends on itself through the cycle #3084
-
Beta Was this translation helpful? Give feedback.
Answered by
rrousselGit
Nov 1, 2023
Replies: 1 comment 1 reply
-
You have a circular dependency on your provider. You can fix the type-inference issue by explicitly typing your providers: final Provider<int> provider = Provider<int>(...); Note that circular dependencies are not allowed. Chances are you'd get a runtime exception when fixing that Dart error if you did indeed have a circular dependency |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
shahmirzali49
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You have a circular dependency on your provider.
This causes Dart's type inference to fail.
You can fix the type-inference issue by explicitly typing your providers:
Note that circular dependencies are not allowed. Chances are you'd get a runtime exception when fixing that Dart error if you did indeed have a circular dependency