Code Monkey home page Code Monkey logo

flutter-clean-architecture-mvvm-example's Introduction

DOGS GAMES

Alt text

Flutter Clean Architecture Example by myanes

Sample app with implementation of every layer of my approach to Clean Architecture for Flutter:

Alt text

Presentation <-> Domain <-> Data

  • Presentation: Screens/Views + ViewModels
  • Domain: Models + UseCases
  • Data: DTOs + DB_Entities +Repositories + DataSources

Tech Specifications

  • DI
  • MVVM: UI State and Events
  • Use cases
  • Repository pattern
  • Networking: Http + Json decode
  • Offline mode: Local database
  • Simple custom Router
  • Theme: Light & Dark (from system settings)
  • Basic Error Handling
  • Testing: Widgets + Unit tests

Libraries ๐Ÿ“ฆ

Comming soon:

  • Translated Strings -> i18n
  • More robust error handling
  • More complex state management examples with bloc
  • Custom App Icon + Splash screen

App Features ๐Ÿ“‹

  • Play Screen. Two rouds where you can guess the breed of a random dog by looking at it's picture. Data comes from Dog CEO: https://dog.ceo/dog-api/
  • Results Scren. It shows correct answers count and a replay button.
  • Results history saved in local database

Testing โš™๏ธ

Both Unit and Widget tests examples are available. For Unit testing dependencies are replaced by mock classes generated by mockito.

Verifications:

  • A game is created with 2 rounds
  • Loading indicator it's shown and hided
  • Move to next round
  • Show game results

Some examples:

- PlayViewModel - Unit testing
- GameCreatorUsecase - Unit testing
- GameResultScreen - Widget testing

License ๐Ÿ“„

Feel free to use it โค๏ธ.

A โญ๏ธ is appreciated


with ๐Ÿง  by myanes ๐Ÿ˜œ

flutter-clean-architecture-mvvm-example's People

Contributors

myanes-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.