Site icon Flutter Packages | Pub dev Packages – Flutter Mobile App World

Flutter Starter Architecture (MVVM)

Short Intro: Starter architectures for your next Flutter project in order to make it scalable and easy for maintenance and tests.

 Flutter Starter Architecture (MVVM)

My custom starter project for Flutter apps.

I was looking for a simple way to build Flutter app in a scalable and clear way way to operate. So I’ve spent a little to search for how to implement an MVVM architecture in a proper and efficient way for scalable apps. This is the first result of my research. I use it for two projects now. This one provide an MVVM architecture powered by get_it and provider. This work was mainly inspired by the work of Filledstacks.

 Overview

I have made:

I have also added a base class for viewmodels here. All the next viewmodels you’ll write should inherit from the BaseViewModel class. There is also a BaseView widget here to mix the access easily to the base viewmodel proper to each class.

At the root of the app, you will see the locator.dart file where I registered an instance of each service and viewmodel in order to use them efficiently in the whole app. You will also find the routes.dart where the named routes of the app are stored in the AppRouter class.

 Future

I will create new branches to add more base project with various kind of scalable architecture.

 Plugins inside

The repository contains based packages for provider, firebase, firebase_auth, cloud_firestore, and get_it

Download Flutter Starter Architecture source code on GitHub

https://github.com/NemesisX1/flutter-starter-architecture

Exit mobile version