flutter-bloc

Triggering initial event in BLoC

帅比萌擦擦* 提交于 2020-12-29 13:12:38
问题 example_states: abstract class ExampleState extends Equatable { const ExampleState(); } class LoadingState extends ExampleState { // } class LoadedState extends ExampleState { // } class FailedState extends ExampleState { // } example_events: abstract class ExampleEvent extends Equatable { // } class SubscribeEvent extends ExampleEvent { // } class UnsubscribeEvent extends ExampleEvent { // } class FetchEvent extends ExampleEvent { // } example_bloc: class ExampleBloc extends Bloc

What are the difference between business logic and UI logic?

人盡茶涼 提交于 2020-06-17 00:07:32
问题 I am learning state management in flutter and most of the time I encounter with words business logic ui logic and some time presentation logic , I searched it on the internet as people explain it in different languages, I couldn't get a better understanding, Could someone please show these three types of logic in the form of an example and explain it very clean and easy? 回答1: When we use a library, it is our responsibility and mission to separate it from critical parts of our code, which is