Skip to content

Object/factory with type IAuthFacade is not registered inside GetIt #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
HussainON opened this issue May 15, 2021 · 7 comments
Closed

Comments

@HussainON
Copy link

I'm experimenting a weird behavior resulting in a fatal error.

Installed versions:

Get_it version: 7.1.3
Injectable version: 1.4.0

The error message is:

Screen Shot 2021-05-15 at 7 21 20 PM

Here are the few files sections related to this error:

injection file

Screen Shot 2021-05-15 at 7 26 53 PM

main file

Screen Shot 2021-05-15 at 7 27 55 PM

Some widgets where get_it and injectable are involved

Screen Shot 2021-05-15 at 7 28 49 PM

Screen Shot 2021-05-15 at 7 35 07 PM

Screen Shot 2021-05-15 at 7 34 13 PM

Screen Shot 2021-05-15 at 7 32 05 PM

I'm trying to fix this for few days.
I don't understand what's going wrong.
There is not syntax error which makes me puzzled of why I'm getting this error.
Any help would be greatly appreciated ;)

@escamoteur
Copy link
Collaborator

Unfortunately this seems to be a problem of injectable and not get_it. I'm a bit surprised to see that you use also provider but still use get_it to access your bloc in the UI?
I recommend having a look at get_it_mixin :-)

@HussainON
Copy link
Author

HussainON commented May 15, 2021

Thanks for your response.
Do you think because I'm using provider with git_it that's what causing the problem?
I tried many different ways to fix it and even searched for similar issues online but it seems no use.

@HussainON
Copy link
Author

If so what would the this UI code below looks like if I used get_it_mixin instead?

Screen Shot 2021-05-15 at 7 28 49 PM

@escamoteur
Copy link
Collaborator

the problem probably doesn't come from the mixture of get_it and provider. Just something that seemed a bit strange to me.
With the get_it_mixin you don't need this part of the code anymore. you could directly use the watchStream function I think, but I'm not so familiar with the BloC library.
check the readme of get_it_mixin.

@HussainON
Copy link
Author

Ok Thank you, I will check it out!

@jberronesc
Copy link

Hello, I also have this problem
How did you solve it?

@escamoteur
Copy link
Collaborator

@jrberronesc please open a new issue and describe in detail your problem with the code that you use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants