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

Overview

πŸ‘· πŸ”§ πŸ”© 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:

  • a helpers folder where I have put all the utilities of the project such as constant values, dart enumerate, extensions, theming, and other general utilities.
  • a models folder where I have put all the data's classes representation.
  • a services folder where I have put all folders relative to data's storing and fetching base on local storage, firebase, or API.
  • a viewmodels folder where I put all the viewmodels related files. In the easiest way, I call viewmodel a bridge between the models, services, and views. Their job is to handle the business logic of the view they are related to in order to make the views part safe from anything non-relevant to UI.
  • a views folder where are stored the UI part of the application. Each view/page/screen of the application is put here in differents folders. Those folders contain the base file of the view and a widgets folder where are stored the widgets which are used only on this view. The global widgets are located in the widgets folder.

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

😎 Author(s)

Junior Medehou Twitter Follow

Getting Started with Flutter

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

You might also like...

A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

A Simple Todo app design in Flutter to keep track of your task on daily basis. Its build on BLoC Pattern. You can add a project, labels, and due-date to your task also you can sort your task on the basis of project, label, and dates

WhatTodo Life can feel overwhelming. But it doesn’t have to. A Simple To-do app design in flutter to keep track of your task on daily basis. You can a

Jan 6, 2023

The next-generation cross-platform Minecraft Launcher.

MultiFold MultiFold is the next-generation cross-platform Minecraft launcher. This project is currently work-in-progress. Contributing You are welcome

Nov 9, 2022

A shopping cart application that lets the user create an account, select items, save the items in the cart, pay using the payment gateway, change account details and check order history.

Shopping Cart A new Flutter application. The main code file has all the code required for the mobile application. Getting Started This project is a st

Oct 14, 2021

Movie ticket order simulation application

Movie ticket order simulation application

Fiu - Movie ticket order simulation application This application is a simulated movie ticket reservation app that was built in the flutter framework a

Oct 24, 2022

This app is a minimal TodoList app that functions like a whiteboard. You can add new tasks, keep track of your tasks to make your day more productive, and then delete it after it is done.

My First Mobile App _ Minimal TodoList Flutter A new Flutter project. Getting Started This project is a starting point for a Flutter application. A fe

Nov 23, 2021

Recipe-flavored markdown: make recipes easy to create and maintain

Recipe-Flavored Markdown Have you ever wanted a simpler approach to writing and

Dec 8, 2022

Starter app for Flutter that includes many different production app features; some not typically included in demo apps.

first_app: Starter app for a Flutter production app Maintainer: Greger Wedel, https://github.com/gregertw Listed on: Latest build and artifacts: ** La

Jan 8, 2023

MSWS Flutter architecture starter

MSWS Flutter architecture starter

msws_starter Module Service Widget Screen Flutter architecture project starter. For examples visit Example project Main abstractions Main 5 types of a

Jul 7, 2021

A starter helper for flutter developers wanting to use firebase phone authentication in their app.

riverpod_firebase_phone_auth A new Flutter project template showing how to handle mobile authentication using Firebase and Riverpod. Packages Used Fre

Oct 31, 2022
Releases(mvvm)
Owner
Junior Medehou
20 yo | Epitech Student | Focused on Dart and TypeScript | Flutter Developer | Passionate about AI, Data and UI
Junior Medehou
The Clean architecture and manage the Flutter project to make scalable with a modularization approach

Clean architecture sample project Flutter template project to explore the Clean architecture and manage the Flutter project to make scalable with a mo

null 5 Oct 18, 2022
Time Maintenance App

timer_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

null 1 Apr 21, 2022
A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter. flutter_bloc, hive, and REST API are some of the tech stacks used in this project.

last_fm A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter. flutter_bloc, hive, and REST API are some of the

Elias Andualem 140 Dec 31, 2022
A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter

A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter. flutter_bloc, hive, and REST API are some of the tech stacks used in this project.

Elias Andualem 139 Dec 28, 2022
A guideline for building scalable Flutter applications.

Scalable flutter app You probably need to read this article before inspecting the repo's code. Building scalable Flutter apps (Architecture, Styling,

Nour El-Din Shobier 36 Nov 23, 2022
Order your favorite burger using this application.

Burger App ?? ?? A Flutter project that can be handy for burger joints. It allows customer to view available burger options and place order Inspired B

Sobhakhar Poudel 14 Nov 17, 2022
A basic implementation of the robot testing pattern for integration/e2e tests

robot A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this is

Samuel Abada 3 Dec 13, 2021
template with tests, login flow, riverpod, logging ect.

Flutter Template What to accomplish has tests basic auth flow riverpod as state provider logging (sentry) navigation (I used Beamer last time but migh

Jeremiah Parrack 20 Dec 22, 2022
Aris scpubliccode - Ricoh Theta Sc2 Api Tests Using Public Information

RICOH THETA SC2 API Tests Using Public Information RICOH THETA API requests for

Behruz Hurramov 1 Jan 9, 2022
A starter project guide to learn Flutter and its tools.

flutter_catalog A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

null 2 Sep 21, 2021