A sample Flutter application using MVP architecture.
Original blog: https://medium.com/@ayushpguptaapg/implementing-mvp-arch-in-flutter-app-1d67f695eab1
This app fetches a text from network and displays it in a text widget. The code is three layered:
- View (widgets,setState(), etc...).
- Presenter (logic...).
- Model (data repository like api calls, database etc).
The whole workflow in the app can be understood with this figure:
Finally if everything goes well you will see this result:
Pull requests, suggestions, improvements etc are all welcome.
Read my blogs: https://medium.com/@ayushpguptaapg