Bloc: Builder is triggered even though buildWhen returns false.

Created on 4 Sep 2020  路  8Comments  路  Source: felangel/bloc

Describe the bug
I'm not sure if this relates to #1682 which was fixed in 6.0.4.

This piece of code works as expected for flutter_bloc: 6.0.2. The widget should only be rebuilt when state is SubjectBookLoadSuccess.
image

However, after upgrading to flutter_bloc: 6.0.4. The builder function was triggered even though the buildWhen return false.
image

bug flutter_bloc

Most helpful comment

@Pakkapao this has been fixed as part of #1699 and included in v6.0.5 馃帀

All 8 comments

Hi @Pakkapao 馃憢
Thanks for opening an issue!

I'll investigate this further but it would be super helpful if you could provide a simple app that reproduces the issue 馃憤

@Pakkapao this has been fixed as part of #1699 and included in v6.0.5 馃帀

@Pakkapao this has been fixed as part of #1699 and included in v6.0.5 馃帀

@felangel , Does this fix also apply to Cubit Listener?

@Pakkapao this has been fixed as part of #1699 and included in v6.0.5 馃帀

@felangel , Does this fix also apply to Cubit Listener?

Did you mean BlocListener? If so yes 馃憤

@Pakkapao this has been fixed as part of #1699 and included in v6.0.5 馃帀

@felangel , Does this fix also apply to Cubit Listener?

Did you mean BlocListener? If so yes 馃憤

i meant CubitListener,

I just thought this case also happened in CubitListener, sorry in advance if my guess is wrong,

CubitListener doesn鈥檛 exist. BlocListener is compatible with cubits 馃憤

CubitListener doesn鈥檛 exist. BlocListener is compatible with cubits 馃憤

Ok @felangel , Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frankrod picture frankrod  路  3Comments

rsnider19 picture rsnider19  路  3Comments

nerder picture nerder  路  3Comments

MahdiPishguy picture MahdiPishguy  路  3Comments

krusek picture krusek  路  3Comments