By WalkingTree   June 30, 2020

A beginner’s guide to architecting a Flutter app

Flutter gives a lot of freedom to the developers to do what they want. This freedom can also be a drawback when you are starting out, especially for state management and app architecture. 

With reference to the application architecture, let’s take a look at the MVVM style architecture. The View is usually a widget layout on one screen, it doesn’t have any logic or state. This is contained in the View Model, which is not aware of any specific details about the View. There’s another piece in this architecture called Services, which handles the storing and accessing of data needed by the application. Services are just Dart classes that abstract the details so that the View Models don’t have to worry about it.

Source:Wikipedia

In this architecture, you create a separate View Model for each screen of the application. The services are global so they remain the same. 

Read on to know more about the MVVM architecture, with a sample code to implement it in your application.   

Blogs

Translate »