Code Monkey home page Code Monkey logo

workout-flutter's Introduction

workout_app

Workout app in Flutter with GetX architecture

Running project

  1. First execute build_runner:

flutter pub run build_runner build

  1. Then run project with:

flutter run

Architecture reasoning

  1. Overall Architecture.

Clean architecture is most correct approach for me as it's dividing app codebase into multiple layers: DataSources (remote & local), Repository. It's providing a nice and consistent way of accessing data. With Futures and Streams it's easy to implement single access or observable data. UseCases are not mandatory though they can help managing complexity of e.g. multiple repositories usage.

  1. State management + MVC

I found GetX to be one of most efficient state managements existing in Flutter frameworks. Developing features is rapid, and there is zero boilerplate with .obs fields. UI is detecting changes itself (thanks to Obx widget) so everything is very reactive meaning you always have latest data presented. If not GetX, I would go for BLoC with cubits.

With GetX you end up with Controller per each page (screen) so it forces MVC (MVVM) pattern. However all data obtained by View from Controller is observable! I also use RxDart as a nice addition for managing observable data.

  1. Model creation

For model creation I used freezed package so I get .copyWith and equals for free.

  1. Persistent storage

I would use Hive or get_storage for saving workouts so they are accessible after app restarted. I didn't use them because of time limitation.

DEMO:

Take a look at: https://github.com/adamstyrc/workout-flutter/blob/main/media/sample.mp4

workout-flutter's People

Contributors

adamstyrc avatar

Watchers

 avatar Agenor Mota 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.