Giter Club home page Giter Club logo

quick_bricks's Introduction

Quick Bricks

Frequently used bricks for Flutter (from Mason)

Feature

depends on bloc, injectable, get it, and freezed

Import to mason.yaml:

feature:
  git:
    url: [email protected]:mrgnhnt96/quick_bricks.git
    path: flutter/feature

You can also use the following to use Logger by default

feature:
  git:
    url: [email protected]:mrgnhnt96/quick_bricks.git
    path: flutter/logger/feature

Params:

  • name
  • path
  • is_hydrated
  • interface_name

Generates:

.
└── my_feature
    ├── application
    │   └── my_feature
    │       ├── my_feature_cubit.dart
    │       └── my_feature_state.dart
    ├── domain
    │   ├── models
    │   │   └── my_feature
    │   │       └── my_feature.model.dart
    │   └── repo
    │       └── my_feature
    │           ├── my_feature_methods.json
    │           └── my_feature_repo.i.dart
    ├── features
    │   └── features.md
    ├── infrastructure
    │   └── my_feature
    │       ├── my_feature_cache.dao.dart
    │       ├── my_feature_entity.dao.dart
    │       └── my_feature_source.dao.dart
    └── presentation
        ├── components
        │   └── components.md
        └── my_feature_screen.dart

Already has cubit depending on repo, and the cubit is being provided to the screen.


Cubit

depends on bloc, (hydrated bloc?), injectable, and freezed

Import to mason.yaml:

cubit:
  git:
    url: [email protected]:mrgnhnt96/quick_bricks.git
    path: flutter/cubit

Params:

  • name
  • is_hydrated
  • path

Generates:

.
└── my_cubit
    ├── my_cubit_cubit.dart
    └── my_cubit_state.dart

Repo

depends on injectable

Import to mason.yaml:

repo:
  git:
    url: [email protected]:mrgnhnt96/quick_bricks.git
    path: flutter/repo

You can also use the following to use Logger by default

repo:
  git:
    url: [email protected]:mrgnhnt96/quick_bricks.git
    path: flutter/logger/repo

How to

repo_method_example.json This file should ready exist and will be used as the config file, should be located in domain>repo>{{repo name}}

interface_name should be provided as the default interface class name.

call mason make repo -c {{path-to-repo_method_example.json}}

Params:

  • name
  • feature_path
  • interface_name // should be located in config file
  • methods // should be located in config file

Generates:

.
├── domain
│   └── repo
│       └── repo_name
│           ├── repo_method_example.json
│           └── repo_name_repo.i.dart
└── infrastructure
    └── my_repo
        ├── my_repo_cache.dao.dart
        ├── my_repo_entity.dao.dart
        └── my_repo_source.dao.dart

Model

depends on injectable

Import to mason.yaml:

model:
  git:
    url: [email protected]:mrgnhnt96/quick_bricks.git
    path: flutter/model

Params:

  • name
  • path

Generates:

.
└── my_model
    └── my_model.model.dart

quick_bricks's People

Contributors

mrgnhnt96 avatar

Stargazers

 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.