Screener: a sample application Uses MVVM pattern

Overview

screener

  • This is a sample application.
  • Uses MVVM pattern
  • Tries to encourage the use of boundaries (by using the concept of packages)

Getting Started 🎯 🎯

  • Download the repo
  • Make sure you are on the Flutter Stable Channel (1.22.6)
flutter channel stable
flutter upgrade
  • Install dependencies, when asked, after downloading the project.
  • Run the cmd
flutter run
  • You should see the app working at this point..

Architecture πŸ— πŸ—

  • The app follows MVVM approach

  • Their is a shared folder, which comprises of all the common entities.

  • Common entites like assets, extensions, services etc

  • Take a folder, let's say home

  • It is broken down into components, models, utils (utilties if any), view and view_models

  • Let's discuss each of them

Components

  • They contain the building blocks of UI.
  • A UI may comprise of a button, or card, or a list.
  • All these items are created under their respective folders
  • Let's say for a list component,
home/components/list/xyz.component.dart

Model (from MVVM)

  • They are usually simple classes
  • For instance, let's take home
  • It would contain models folder, including all the models needed for home
home/models/xyz.model.dart

View (from MVVM)

  • These are the screens visible to the user on their device.
  • For instance, home would have views folder
home/view/xyz.view.dart
  • We have 3 views
  1. HomeView. Now home has 2 options (Egestas scleri) and (Consectur)
  2. On click of Egestas scleri, you see the PellenView
  3. On click of Consectur, you see the FringillaView

Templates

  • They are some cases, when a view has a piece of UI, that is somewhat big.

  • We extract those bits of UI, into the templates

  • Let's say for the home view, we have a template as,

home/templates/carousel/xyz.template.dart

ViewModel (from MVVM)

  • They help in transforming the data into models.
  • For instance, home would have view_models folder
home/view_models/xyz.viewmodel.dart

Utils

  • Any additional helpers or strings are put inside the utils
  • For instance, home would have utils folder, containing all the strings needed
home/utils/strings.dart

Shared

  • Their is a folder called shared, which includes all the common entities inside the app

  • For instance, all the styles, colors are placed under styles

shared/styles/xyz.dart
  • For instance, all the services are placed under the services folder
shared/services/xyz.service.dart

Data

  • Sample data files are put inside the assets
  • When needed they are fetched within the app.

Testing 🧐 🧐

  • Uses golden tests https://pub.dev/packages/golden_toolkit
  • Integration tests
flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/app_test.dart
flutter drive \
--driver=test_driver/integration_test.dart \
--target=integration_test/app_test.dart
-d "9B4DC39F-5419-4B26-9330-0B72FE14E15E"
You might also like...

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

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

Flutter Architecture Blueprints Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to dev

Apr 9, 2022

This is a simple client of Reddit built with MVVM and Provider powered by a custom OAuth2.0 login

πŸ‘· πŸ”§ πŸ”© Flutter Starter Architecture (MVVM + Hive) My custom starter project for Flutter apps. I was looking for a simple way to build Flutter app in

Oct 26, 2022

A basic boilerplate template for starting a Flutter GetX project. GetX, Dio, MVVM, get CLI, Localization, Pagination etc are implemented.

A basic boilerplate template for starting a Flutter GetX project. GetX, Dio, MVVM, get CLI, Localization, Pagination etc are implemented.

Flutter GetX Template (GetX, Dio, MVVM) This Flutter Template using GetX package for State management, routing and Dependency Injection (bindings). We

Jan 9, 2023

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

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

Flutter Architecture Blueprints Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to dev

Dec 31, 2022

Bu projede basit MVVM mimarisini kullandΔ±m

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

Dec 28, 2021

This is a simple client of Reddit built with MVVM and Provider powered by a custom OAuth2.0 login

πŸ‘· πŸ”§ πŸ”© Flutter Starter Architecture (MVVM + Hive) My custom starter project for Flutter apps. I was looking for a simple way to build Flutter app in

Oct 26, 2022

Blog app v2 Clean Architecture With MVVM

Blog app v2 Clean Architecture With MVVM

blog_app_v2 An initial blog app on my repo refactored and built with clean archi

Nov 6, 2022

Responsive Whatsapp CLone - MVVM Architecture,Provider

whatsapp_clone Flutter project. Using MVVM Architecture, firebase, Provider and Rest API This project is a starting point for a Flutter application. A

Jan 2, 2023

Menaclub app for admin using nodejs as backend,RestAPI,provider as statemangement and follows MVVM architecture

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

Nov 7, 2022
Owner
Behruz Hurramov
Behruz Hurramov
Behruz Hurramov
Flutter mvvm archi - Flutter Advanced Course - Clean Architecture With MVVM

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

Namesh Kushantha 0 Jan 8, 2022
Music player application for android. It's uses MVVM architecture and Provider & ValueNotifier state management.

music-player-flutter Flutter music player application which is my personal project published to play store. Project structures are as following,

null 30 Jul 10, 2022
Flutter plugin to rapidly create a Page with MVVM design pattern

mvvm_builder mvvm_builder is a Flutter plugin to help you implement MVVM design pattern with flutter. MVVM = Model - View - ViewModel Installation To

Gautier 21 Jun 4, 2021
Flutter app using MVVM architecture pattern , dio , provider , intl packages.

News App Simple news application using free news API for fetching realtime data from the internet. Features -Used MVVM architecture pattern. Packages

null 3 Mar 25, 2022
A Flutter MVVM provider demo application.

Flutter MVVM + Provider Demo A Flutter MVVM provider demo application. Demo About It simply loads Posts data from API and render the posts on the scre

Shubham Chhimpa 132 Oct 17, 2022
Architecturing Flutter Application with MVVM using GetIt

Architecturing Flutter Application with MVVM using GetIt Starting with Basics ??‍?? Flutter: Flutter is an open-source framework by Google for buildin

ASMIT VIMAL 8 Dec 15, 2022
A fully functional Movies Application built with Flutter. The application built with null safety and clean architecture, also uses OMDB API for fetching movies in the search item

Cinema DB Project Details This project uses null safety feature Project uses clean code architecture (Uncle Bob's Architecture) Project can run on bot

Dhruvam 2 Oct 1, 2022
A simple application connected with API (The Movie Database), related to movies. Application created using BLoC pattern and RxDart

MovieApp I will not hide that this is the most difficult application I have done so far (and I am still working on new features). It looks like this (

Adam Dybcio 9 Oct 28, 2022
Boilerplate for Flutter + GetX MVVM

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

Olayemii Garuba 4 May 31, 2022