We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
I have different model classes that I would like to save to a database. For this For example, one class is called Data Model.
class DataModel {}
I have defined a database interface class.
class DbInterface<T> { ...... }
Then I have my database class.
class Database<T> implements DbInterface<T> { ... }
For a specific datamodel i register this within Getit
getit.instance.registerSingelton<DbInterface<DataModel>>(Database<DataModel>)
When trying to get a instance Getit.instance.get<DbInterface<DataModel>>()
Getit.instance.get<DbInterface<DataModel>>()
I get a error saying the DbInterface is not known within GetIt.
So, what Im I doing wrong?
The text was updated successfully, but these errors were encountered:
On a first glance, this should work. I have to try to reproduce this
Sorry, something went wrong.
I now tried to replicate exactly what you are doing:
GetIt.I.registerSingleton<TestBaseClassGeneric<TestBaseClass>>( TestClassGeneric<TestBaseClass>()); final instance1 = GetIt.I.get<TestBaseClassGeneric<TestBaseClass>>(); expect(instance1 is TestClassGeneric<TestBaseClass>, true);
which works without problems.
My class definitions look like:
class TestBaseClassGeneric<T> { } class TestClassGeneric<T> implements TestBaseClassGeneric<T> { }
I close this for now. if you have more information, please comment.
No branches or pull requests
I have different model classes that I would like to save to a database. For this
For example, one class is called Data Model.
class DataModel {}
I have defined a database interface class.
Then I have my database class.
For a specific datamodel i register this within Getit
getit.instance.registerSingelton<DbInterface<DataModel>>(Database<DataModel>)
When trying to get a instance
Getit.instance.get<DbInterface<DataModel>>()
I get a error saying the DbInterface is not known within GetIt.
So, what Im I doing wrong?
The text was updated successfully, but these errors were encountered: