Bloc: Enum is not supported in states

Created on 25 Oct 2019  路  2Comments  路  Source: felangel/bloc

Describe the bug
If state has enum field, view not refresh and not detect changes.

To Reproduce

enum Pages { quizPage, myProfilePage, settingsPage }

@immutable
class NavigationState {
  final Pages page;
  final bool isOpenedBottomBar;
  final bool isVisibilityBottomBar;
  final bool isOpenCropPage;
}

Expected results
All fields except enum work correctly. The enum field is read correctly in the view, but does not detect changes.

question

Most helpful comment

Ok, nothing. while creating an example for you, i realized that it works. The problem was my fault.

All 2 comments

Hi @michaldev 馃憢
Thanks for opening an issue!

Are you able to share a link to a sample app which illustrates the problem you鈥檙e having? There should be no issue with using enums. Thanks!

Ok, nothing. while creating an example for you, i realized that it works. The problem was my fault.

Was this page helpful?
0 / 5 - 0 ratings