Closed imelos closed 5 years ago
V2.3.3
class HomeModule extends ModuleWidget { @override List<Bloc<BlocBase>> get blocs => [ Bloc((i) => HomeBloc(), singleton: true) ]; @override List<Dependency> get dependencies => []; @override Widget get view => HomeWidget(); static Inject get to => Inject<HomeModule>.of(); }
And then
final HomeBloc bloc = HomeModule.to.bloc<HomeBloc>();
Every time after rebuilding HomeWidget my bloc variable has new HomeBloc instance(not singleton). Is that expected behavior?
bloc
HomeBloc
It´s is a bug! i'm fix it
what version bloc_pattern?
Thanks!
V2.3.3
And then
Every time after rebuilding HomeWidget my
bloc
variable has newHomeBloc
instance(not singleton). Is that expected behavior?