Code Monkey home page Code Monkey logo

flutter_getx_template's Introduction

Flutter GetX Template (GetX, Dio, MVVM)

This Flutter Template using GetX package for State management, routing and Dependency Injection (bindings). We are using MVVM (Model View ViewModel) architectural pattern here. For network call we are using Dio package. We followed the recommended folder structure of GetX and used Get CLI command line tool for creating the folder structure.

Architecture of this project: MVVM

MVVM (Model View ViewModel) is one of the most popular architectural pattern for Android App development. Basically this pattern separates User interface from business-logic and data-logic. So that it's divided into three layers: Model layer, View layer and View model layer. Let's explore it more deeply.

mvvm

ViewModel: At first let's talk about ViewModel. Actually view model is a controller where we implement our business logics. It receives the data from the model and process the data according to business logic and pushed into the live data observers which is observing by view.

View: View is the collections of widgets like Text, Image, Dropdown etc. Which will be displayed to the users. Even it controls the user input. When it needs any data it command the view model (In this project it's controller) for data and observe the response. Till then it may display a loader to the user.

Model: Model is basically backend logic. It controls the data source.

To configure and run this project check here

You will find at above link step by step instructions with screenshots.

run this project by command line

Dev: flutter run --flavor dev lib/main_dev.dart

Prod: flutter run --flavor prod lib/main_prod.dart

How to update app information and continue development for your own project?

  1. Rename root folder name
  2. Update project name and description from pubspec.yaml.
  3. Update app launcher name and icon. Reference
  4. Update your app's package name by running this command:

flutter pub run change_app_package_name:main your_package_name

How was this project developed?

  • Run get cli command to create project in the required directory: get create project
  • Create main_view by running this command: get create page:main and so on...

flutter_getx_template's People

Contributors

hasancse91 avatar hasibul-bs23 avatar hasibul-hasan-shuvo avatar kazi-swap avatar kazimdsaidul avatar kmmuntasir avatar shafayathossain avatar tawhidularefindcc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter_getx_template's Issues

Xcode configuration for flavor/Scheme

  • In this project we have used flavor configuration for Android. In gradle file there are dev and prod flavor available. We have to configure XCode to support different development environment flavor like Android.

  • #14

Language settings should be integrated (English and Bengali Language)

In Settings page, there is an option to set Language. We need to show a pop-up dialog and show a Radio group with these 3 items:

  1. English
  2. Bengali
    And 2 buttons: Cancel, OK.

If user select English and hit OK button, we have to store this data in our preference and set Locale('en'). In the same way it should work for Bengali. The default Locale is English.

Integrate Local database (SQLite) for offline support

  • Use floor package
  • Store all API response in local DB (Inside remote data source, we have to call local data source to store the data)
  • When controller call to repository for data, repository will check it first at local data source. If available simply return it and then call to remote data source. When remote data source get response from server, it should update local data source.
  • In offline mode user can see the previous stored data
  • Make a favorite icon in repository list item. This favorite data will store in local db.
  • All favorite repositories will be shown in Favorite page (middle of the bottom tab)

Need unit tests

As of now there are no unit tests. I'd like to work on writing tests.

Issues Related flutter_localizations in template

1. I ran pub get many times but the issue in files due to localizations remains

issues

2. Instead of all localizations i tried to run the main_dev but it could not make the app running gradle assembledebug infinitely

issue2

F:\Github Apps\flutter_getx_template>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.22000.434], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[√] Chrome - develop for the web
[√] Android Studio (version 2021.1)
[√] VS Code (version 1.63.2)
[√] Connected device (3 available)

• No issues found!

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.