Giter VIP home page Giter VIP logo

mason_bricks's Introduction

Hi there ๐Ÿ‘‹

I'm a (Flutter) Technical Lead / Senior Consultant at XAM Consulting & TFC Consulting in Sydney, NSW ๐Ÿ™๏ธ Primarly working with Flutter & .NET Tech!

  • ๐Ÿ”ญ Iโ€™m currently working on Flutter Applications and Open Source Packages!
  • ๐Ÿง‘โ€๐Ÿ’ป Iโ€™m looking to collaborate on open source projects!
  • ๐Ÿ’ฌ Ask me about Flutter, Dart, .NET.
  • ๐Ÿ˜„ Pronouns: he/him/his
  • โšก Fun fact: I love watching Twitch!
  • ๐Ÿ“ซ How to reach me: LinkedIn, Twitter

Open Source Projects

Mason Bricks Animate It FlutterNavigator Moody.DialogService

  • More to come soon!

Github Stats

Luke's Github Stats

mason_bricks's People

Contributors

ashishbeck avatar felangel avatar lukemoody01 avatar wizlif 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

mason_bricks's Issues

feat: Generate tests file template for feature_brick

Description

As a developer, I would like my tests file to be generated and formatted when using the feature_brick brick

Requirements

  • Add Widget Tests template
  • Add Bloc Tests template
  • Add Cubit Tests template
  • Add Provider Tests template
  • Add Riverpod Tests template

Additional Context

N/A

feat: How to skip the "SKIP THIS IF NOT USING A JSON FILE" message when executing model from config

Brick

  • model
  • feature_brick
  • app_ui
  • service
  • service_package

Description

When running the cli in config mode I get a message "SKIP THIS IF NOT USING A JSON FILE" and I need to do "Enter"

Desired Solution

Have an option to not have this message and start immediatly

Alternatives Considered

A clear and concise description of any alternative solutions or features you've considered.

Additional Context

I run the mason make model from an "exec" command and I do not want to add another complexith

feat: Force the Dart variable naming convention (camelCase) in models

Brick

  • model
  • feature_brick
  • app_ui
  • service
  • service_package

Description

Force the Dart variable naming convention (camelCase) in models.

Desired Solution

{
  "eye_color": "black"
}

Currently, the class properties follow the JSON key names, and usually, developers generate models from a sample JSON file they get from the server-side API docs, and mostly the JSON keys are in a snake_case.

So I'd suggest the following:

  • Force the Dart variable naming convention (camelCase).
  • Add the @JsonKey(name: 'eye_color') to models that have toJson() and/or fromJson().

feat: cubit option for feature_brick

Description

When using BLoC, I always start by using cubits instead of bloc. Is it in the roadmap that you would add one?

Desired Solution

Introduce a cubit option when generating a new feature brick

Additional Context

I'm still very new to bricks. I might be able to contribute in future when I got to learn more about it.

feat: always use package imports instead of relative imports

Description

As a developer I want my imports to use package imports instead of relative imports.

Desired Solution

Get the working directory and save that into a variable for the template to use.

Requirements

  • Update this for model brick
  • Update this for service brick
  • Update this for service_package brick
  • Update this for feature_brick

Additional Context

N/A

feat: Change model format to split on ' ' instead of '/'

Description

As a developer, I would like to type my model format like -> 'String myString' instead of 'String/myString'.

Desired Solution

Instead of splitting at '/' we would need to split at ' '.

Additional Context

Very easy change :)

Unable to execute hook pre_gen.dart fix:

model

  • [ x ] model

Description
\models> mason make model
? What is the models name? (model) users
? Does this model have a copyWith method? (Y/n) Yes
? Does this model use equatable? (Y/n) Yes
? Does this model use json? (Y/n) Yes
Unable to execute hook: C:/Users/anypo/AppData/Local/Mason/Cache/hosted/registry.brickhub.dev/model_0.3.7\hooks\pre_gen.dart.
Error: Unexpected type 'invalid-type' of a map spread entry. Expected 'dynamic' or a Map.
...context.vars,
^

Steps To Reproduce

See above

Expected Behavior
It creates the model.

Screenshots
N/A

Additional Context
I'm not sure what I'm doing wrong, but it used to work, any ideas?

feat: New brick - models_bundle

Brick

  • model
  • models_bundle
  • feature_brick
  • app_ui
  • service
  • service_package

Description

As a developer/user, I want a models_bundle brick, so that we can generate multiple models at the same time.

Use case: When we are creating a new project/feature, we can define the known models and accelerate the development instead of running the model brick multiple times

Desired Solution

Create a new brick called models_bundle
This brick will mainly wrap the existing model brick, and loop through the models in the config

Alternatives Considered

N/A

Additional Context

N/A

fix: Could not find lib folder in

Brick

  • model
  • feature_brick
  • app_ui
  • service
  • service_package

Description

Could not find lib folder in /home/user/IdeaProjects/flutter/blogs
Re-run this brick inside your lib folder
An exception occurred while executing hook: /home/user/.mason-cache/hosted/registry.brickhub.dev/feature_brick_0.6.2/hooks/pre_gen.dart.
Error: Exception

Steps To Reproduce

  1. mason init
  2. mason add feature_brick
  3. mason make feature_brick --feature_name list_blogs --state_management riverpod
  4. See error

Expected Behavior
No error

Screenshots
If applicable, add screenshots to help explain your problem.

Additional Context
Using zsh, if that matters.

fix: [feature_brick] Provider State Management gives a "Could not find the correct Provider<LoginNotifier> above this Consumer<LoginNotifier> Widget" error

feature_brick

  • model
  • feature_brick
  • app_ui
  • service
  • service_package

Description
With the default implementation of provider state management, flutter throws this exception when LoginPage() is put in the widget tree.

Steps To Reproduce

  1. Create a new project and a new feature brick
  2. Put the feature page in home of MaterialApp of main.dart
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(),
      home: const LoginPage(),
   );
  1. Build

Expected Behavior
It should display the correct page

Solution
Replace this in login/view/login_page.dart:

     return Provider(
      create: (context) =>
          ChangeNotifierProvider(create: (_) => LoginNotifier()),
      child: const Scaffold(
        body: LoginView(),
      ),
    );

with this:

    return ChangeNotifierProvider(
      create: (context) => LoginNotifier(),
      child: const Scaffold(
        body: LoginView(),
      ),
    );

or this:

    return MultiProvider(
      providers: [
        ChangeNotifierProvider(create: (_) => SettingsNotifier()),
      ],
      child: const Scaffold(
        body: LoginView(),
      ),
    );

Additional Context
Maybe I am implementing the widgets in the wrong way which is why I am getting this error. Please do let me know in case.

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.