-
-
Notifications
You must be signed in to change notification settings - Fork 153
how to register an instance with generic param #48
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
What Error do you get? |
My TmdbBloc is a generic class |
can you show me the class this here is from? locator.registerFactory<TmdbBloc<T>>(
() => TmdbBloc<T>(
locator<TmdbRepo>(),
),
); |
Here you go |
I don't see the |
Of course |
I just want to know where the parameter T comes from. That's why I wouldd like to see the class where the registerFactory is |
I don't understand what you mean, T is a generic type, that's it. I just wanna know whether get_it support registering generic type or not? |
I'm pretty sure it's not possibe because generics get resolved at compile time while get_it works with runtime types |
This won't work.
The text was updated successfully, but these errors were encountered: