Article structure:

— Several advantages of bloc+ RxDART

— Example code to simply call the network interface, and then refresh the page display

— Bloc + RxDART implementation principle

— Bloc + RxDART Several classic use scenarios, can solve complex problems in business scenarios.

1. Several advantages of bloc+ RxDart

1). Implement the MVC pattern

Widget only does UI presentation, Bloc implements control logic, and Model does data encapsulation.

In the new demand development of the operation line, I actually used Bloc to make a new page, which is the business failure page.

This page has three levels of failure reason selection, failure reason is cascaded, and each time after selecting equipment to re-request inventory, submit failure and other operations.