The second option is not the one I‘d prefer, because the new TimerBloc would get kind of messy I think. Now in the UI I have to combine TimerBloc and BurnInBloc with builders, which looks kind of messy, or I‘d have to add the features of BurnInBloc into TImerBloc. I thought it would be a nice idea to seperate these featues, because of the benefits mentioned. If a touch event is emitted the BurnInBloc Timer will get resetted. The BurnInBloc internally runs a Timer.periodic which triggers a protect Event each 60sec. The TimerBloc internally runs a Timer.periodic which triggers a tick event each second. In this application I have a TimerBloc which handles Timer ticks and reduces the remaining time left.Īfter some time I thought it would be awesome if the app has a burn-in-protection, because i did not want the users phones to break, because it‘s displaying a text for a couple of minutes. I am currently working on a workout timer application.
Hey there ? I want to give some Impressions on this topic too. One more question - since we have MultiBlocProvider I guess some of the arguments behind creating it can apply to MultiBlocBuilder case, can't it?Īnyway - I will understand if the implementation is complex, but my firm belief is that it is a needed feature. Hence I created additional BLoCs - each for these different calendars and I combine them with CalendarViewBloc. I have a few other places with calendars, where I need CalendarViewBloc, but since they have different appointment types (not events), I don't need EventFilterBloc part there, I rather need other appointment types. I would consider each one as a feature rather than a resource. Hence, I created two separate BLoC(s) - one for event filter EventFilterBloc and one for calendar view CalendarViewBloc. work, holiday and etc) or change its view (day, week, month and etc.). I have a calendar widget, which can be either filtered by specific appointment types (e.g. I will also put here my use case since from my standing point it makes sense:
Bloc reusability - you can create a BLoC and then use it in several places.I believe there is at least one good use case over there and as many people insisting for the feature mentioned, there are few reasons for the request: