Giter VIP home page Giter VIP logo

movie_xsis's Introduction

Naming convention To reduce the effort needed to read and understand source code

  1. variable : camelCase
  2. class name: (upper) CamelCase
  3. Folder name: snake_case
  4. Use english!

Data Flow

  1. View -> PageEvent -> Bloc -> Repository -> Network/Sqlite or Both -> Bloc -> PageState -> View
  2. View -> PageEvent -> Bloc -> Repository -> Network/Sqlite or Both -> Bloc -> PageState -> Future -> View

Basic rules:

  1. lib/pages: ui only, no logic app allowed
  2. lib/bloc: logic only: no widget, no context, no access data directly.
  3. lib/data: maintain and access data.
  4. lib/data/repositories/ : I/O data that needed in this repository
  5. lib/data/repositories_impl/ : providing data. (can be fake repository)

Network

  • File config url remote_constant.dart
  • File penghubung http ke repository remote_datasource.dart
  • Custom httpnya di http_client.dart

Database(Sqlite)

  1. create script table in database.dart
  2. create class Dao extending BaseDao
  3. add dao di injector_config.dartk
  4. run common.injector generator
  5. implement di repository

Kiwi Injector note: -Add class in injector_config.dart /////////////////////////////////////////////////// flutter packages pub run build_runner build /////////////////////////////////////////////////// Note: On first attempt to run this command you might encounter a conflict error. If so, please add the --delete-conflicting-outputs argument to your command: ///////////////////////////////////////////////////////////////////////////////////// flutter packages pub run build_runner build --delete-conflicting-outputs /////////////////////////////////////////////////////////////////////////////////////

-json to model : https://javiercbk.github.io/json_to_dart/

HOW TO RUNING THIS PROJECT

install flutter 2.10.5 pub get run this code in terminal -> flutter packages pub run build_runner build --delete-conflicting-outputs run apps

movie_xsis's People

Contributors

haikalharin avatar

Watchers

 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.