A MVVM architecture and project structure approaches to developing Flutter apps

Overview

Flutter Architecture Blueprints

Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to developing Flutter apps.

Documentation

Installation

Environment

iOS

  • iOS 13+

Android

  • Android 5.1+
    • minSdkVersion 22
  • targetSdkVersion 30

App architecture

Code Style

Assets, Fonts

If added some assets or fonts

Models

If added some models for api results

Localizations

If added some localizations (i.g. edited *.arb)

Git Commit message style

Code collections

Project settings

Working status Category Description Codes
Dart Dart version pubspec.yaml
asdf asdf .tool-versions
Dart Switching between Development and Production environment constants.dart, runConfigurations, Makefile
Dart Lint / Analyze analysis_options.yaml
Android Kotlin version build.gradle
Android Apk attributes build.gradle (compileSdkVersion, applicationId, minSdkVersion, targetSdkVersion)
Android Switching between Development and Production environment build.gradle, Flavor dirs, signingConfigs
iOS Xcode version compatibilityVersion
iOS Podfile Podfile
iOS Switching between Development and Production environment xcconfig, Podfile
Firebase [Android] Switching between Development and Production google-service.json using flavors development and production
Firebase [iOS] Switching between Development and Production GoogleService-Info.plist using run script copy_google_service.sh, development and production
Firebase Auth SignIn, SignOut auth_data_source_impl.dart
Firebase Crashlytics Crash Reports main.dart
Firebase Performance Network monitoring with dio_firebase_performance app_dio.dart

Architecture

Working status Category Description Codes
Base Using Riverpod + Hooks + ChangeNotifier + MVVM news_page.dart, news_view_model.dart, news_repository.dart, news_data_source.dart
Networking Using dio and Retofit app_dio.dart, news_data_source.dart
Data Using Freezed model classes
Constants Define constants and route names constants.dart
Localization Switching between two languages with Intl package *.arb
Error handling Using Result pattern - A value that represents either a success or a failure, including an associated value in each case. result.dart, news_repository_impl.dart, home_page.dart

UI

Working status Category Description Codes
Theme Staticly Switch between light and dark themes app_theme.dart
Font Using Google font app_theme.dart
Transition Simple animation between screens using Hero article_item.dart, detail_page.dart

Testing

Working status Category Description Codes
API(Repositories) Using mocktail view_mode_test.dart
✅️ UI Using mocktail widget_test.dart
Coverage reports Send the report to Codecov on CI codecov.yml, codecov.sh, flutte-ci.yml

CI

Working status Category Description Codes
Git Git hooks for format and analyze package.json, Makefile
Git .gitignore settings .gitignore
Build Using Codemagic codemagic.yaml
Build Using Bitrise bitrise.yml
Build Using Github Actions .github/workflows/flutter-ci.yml

Getting Started

Setup

$ make setup
$ export PATH="$PATH":"$HOME/.pub-cache/bin" # Add your run-commands (.zshrc, .bashrc, etc)
$ make dependencies
$ make build-runner

How to add assets(images..)

  1. Add assets
  2. Run FlutterGen

How to add localizations

  1. Edit *.arb files.
  2. Run generate the flutter pub get

Make .apk and .ipa file

Android

$ make build-android-dev
$ make build-android-prd

iOS

$ make build-ios-dev
$ make build-ios-prd

Run app

$ make run-dev
$ make run-prd

Special Thanks.

Contributors

You might also like...

A project to learn about Clean Architecture

A project to learn about Clean Architecture

Star Wars - Clean Architecture I'm developing this App aiming to learn about Clean Architecture and Dart/Flutter It's a very simple app which the user

Feb 1, 2022

Self Host Group Chat App (firebase + clean architecture) is full functional group chat where you can create new groups and update profile and communicate in different groups easily. there 2 auth firebase method [Google & Email Password]

Self Host Group Chat App (firebase + clean architecture) is full functional group chat where you can create new groups and update profile and communicate in different groups easily. there 2 auth firebase method [Google & Email Password]

Self Host Group Chat App (firebase + clean architecture) Show some and star the repo to support the project Screenshots Packages we are using: flutter

Jan 8, 2023

Flutter travel app with clean architecture and firebase

atlas 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

Jan 25, 2022

Number trivia Android and ios application using flutter clean architecture

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

Jun 9, 2022

Real-world movie database mobile application with the Flutter SDK and DDD clean architecture.

Real-world movie database mobile application with the Flutter SDK and DDD clean architecture.

Moving Pictures Moving Pictures is a mobile application built with the Flutter SDK for Android and iOS. It’s an application that gets the information

Jan 7, 2023

Flutter App to save notes secure, using cryptography, clean architecture and some design patterns.

notes 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

Mar 28, 2022

A study about clean architecture and TDD(Test Driven Development) in Flutter.

coin_checker A study about clean architecture and TDD(Test Driven Development) in Flutter. Getting Started This project is a starting point for a Flut

Jan 25, 2022

Example repository of handling permissions in Flutter using BLoC and Clean Architecture.

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

Dec 28, 2021

Cross-platform GitHub client in Flutter and BLoC clean architecture

FlutterHub Cross-platform GitHub client in Flutter and BLoC clean architecture. SwiftHub - Swift version is available Try Web version Get Started To g

Nov 12, 2022
Owner
zulfi007
zulfi007
Flutter Fashion Week App UI and Project Structure

flutter_fashion_week Flutter Fashion Week App UI and Project Structure.

Ufuk 33 Jun 21, 2022
Flutter Modular - A smart project structure

Flutter Modular Getting started with Modular flutter_modular Documentation flutter_modular_test Documentation modular_codegen Documentation Features a

Flutterando 1.2k Jan 5, 2023
The most complete Chat UI for flutter highly customizable and helps developing chat UI faster.

⚠️ Dashchat v2 is available in v2 branch ⚠️ You can open issues for the v2 to indicate things we need to implement/fix. Also the API can change until

Fayeed Pawaskar 432 Dec 11, 2022
Dio desafio chatonline flutter firebase - Developing an Online Chat Application Integrated with Firebase

Desenvolvendo um aplicativo de Chat Online integrado ao Firebase Descrição Neste

Yian Zaratin 1 Jan 4, 2022
News Headline app is build in Flutter MVVM and REST Apis for News is used in this app.

About The Project Flutter MVVM project for News Headlines. REST Api for News is used in this project. App Demo Api for News Get free api from here : h

Aizaz ahmad 3 Aug 16, 2022
Sorting Visualizer using Flutter followed MVVM Pattern and used Stacked Services. Hope you like it 😋

Sortlizer An App to visualize various sorting algorithms...Developed using Flutter, followed MVVM pattern, and used stacked services. Play Store Link

Roshan Kumar 17 Dec 28, 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
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
A Flutter project built with Clean Architecture

smash_fighters smash_fighters.mp4 A Flutter project made using: Clean Dart that follows all the Clean Architecture guidelines: https://github.com/Flut

Leticia Baleiro 21 Dec 30, 2022
A Package providing Core functionality/Template to start off a Clean Architecture based project

A Package providing Core functionality/Template to start off a Clean Architecture based project Features Provides with APIResult & UseCaseResult model

null 1 Dec 25, 2021