Bloc: Is it necessary to use BlocProvider.of when using DI?

Created on 12 Apr 2019  路  1Comment  路  Source: felangel/bloc

I provide lazy singletons for all of my bloc instances using get_it, So I simply inject them into my widgets.

I want to know that It's necessary to use BlocProvider.of or It's ok to use any DI libraries?

question

Most helpful comment

Hi @SaeedMasoumi 馃憢
Thanks for opening an issue!

Great question! BlocProvider is there if you need it but there's nothing stopping you from using any other DI libraries 馃憤

>All comments

Hi @SaeedMasoumi 馃憢
Thanks for opening an issue!

Great question! BlocProvider is there if you need it but there's nothing stopping you from using any other DI libraries 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

craiglabenz picture craiglabenz  路  3Comments

krusek picture krusek  路  3Comments

ricktotec picture ricktotec  路  3Comments

nerder picture nerder  路  3Comments

1AlexFix1 picture 1AlexFix1  路  3Comments