Refresh the library

  • Thanks to the author of Flutter_easyRefresh, git address: github.com/xuelongqy/f…
  • Personal project Address :github.com/wlong8000/f…

Go straight to code

  • The ViewModel class, which handles network requests and data processing, separates network requests from data presentation

  • Register a listener in initState. Once the data is sent, it will be notified to this place. Call setState and refresh the interface

  • The build only needs to show the data, not deal with the data logic