Bloc: [Question] What's the purpose of the RepositoryProvider?

Created on 11 Sep 2020  路  1Comment  路  Source: felangel/bloc

Hi!

I had a quick question. I wasn't sure what use case does a RepositoryProvider cover, could I not create a separate instance of a repository if another bloc needs it?

Thanks!

question

Most helpful comment

Hi @JoseGeorges8 馃憢

Please read more on this topic here.

could I not create a separate instance of a repository if another bloc needs it?

You could but but there's no point in doing so. It's an optimization to re-use an existing instance.

>All comments

Hi @JoseGeorges8 馃憢

Please read more on this topic here.

could I not create a separate instance of a repository if another bloc needs it?

You could but but there's no point in doing so. It's an optimization to re-use an existing instance.

Was this page helpful?
0 / 5 - 0 ratings