-
-
Notifications
You must be signed in to change notification settings - Fork 153
GetIt fails to register instances #81
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
Comments
Why are you use instance names? If you use them when registering you have to pass the name when you access the instance with |
I added the instance names because I was getting the error posted in the initial comment. Initially, they were working fine without the instance name, but it just stopped registering until I added the instance names. After adding the instance names and calling get with them, the application is working fine. I find the behavior strange because I have other projects in which I use get_it and don't use the instance names and they all work fine. I even tried copying a working configuration from one of my projects and changing the instances to match the current project classes, but it still failed. |
This sounds really weird. Did you always use the gerneric types when using without names? |
Yes. |
Uh oh!
There was an error while loading. Please reload this page.
I have setup my locators like so
And this is my main method
and this is the IBorrowApp widget
But when the app is run, I get an error
Flutter doctor summary:
UPDATE: Added the code for the IBorrowApp.
Side note: I do not use any relative imports in the app, all my imports are at the package level.
The text was updated successfully, but these errors were encountered: