Article structure:
- Several advantages of the Bloc + RxDart
- The sample code simply invokes the network interface and then refreshes the page display
- Bloc + RxDART implementation principle
- The Bloc + RxDart is used in several classic scenarios to 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.