EasyDeps : brick-ception
Tags: flutter, dart, opensource, mason
Published: 2024-05-12 16:34:56

The Flutter ecosystem is abuzz with a new framework – Mason. Boasting over 300 bricks and counting, it's a construction zone of awesome functionality. But what if we could take things a step further? Enter the meta-brick, a brick built specifically for other brick developers.

This isn't your average UI brick. It's about streamlining the workflow for fellow brick builders. Imagine a world without manually managing dependencies in each brick. This innovation offers centralized dependency management through a dedicated package.json file, keeping your code clean and organized.

Picture this: You integrate your brick into a Flutter project, and poof! All necessary dependencies are installed automatically. That's the magic of this brick.
Additionally, it champions project structure, residing within a dedicated hooks directory for a minimalist's dream layout.

Ready to unlock this developer superpower? Buckle up – we'll be diving into [EasyDeps](https://brickhub.dev/bricks/easy_deps/0.1.0+1), with clear instructions that demystify the process. It's recursion made simple, without the headache of explaining Inception.

## How this project work?

### Installation:
Get your brick on board with mason add [easy_deps](https://brickhub.dev/bricks/easy_deps/0.1.0+1) (or go global with mason add -g easy_deps).

### Generation:
Unleash the magic with mason make [easy_deps](https://brickhub.dev/bricks/easy_deps/0.1.0+1). This brick is low-maintenance – no pesky questions to slow you down.

### Dependency Nirvana:
Boom! You've got yourself a packages.json file nestled within your brick's folder.

But Wait, There's More!

[easy_deps](https://brickhub.dev/bricks/easy_deps/0.1.0+1) doesn't stop at a fancy package.json. It also introduces some undercover heroes:

`package_installation_handler`: This bad boy parses your package.json, ensuring all the dependencies are listed and ready for action.

`post_gen.dart`: In the early days, easy_deps might be a little overzealous, replacing your existing post_gen.dart It simply includes the call to the package_installation_handler code, ensuring your dependencies are installed smoothly.

Don't worry the package.json will be deleted once your brick is integrated into the app project, It's all temporary.

## Here's the good stuff:

### Manual configuration?
More like "manual vacation!" This bad boy handles it all, so you can spend your time on more important things.

### Cleanliness
The dependency handler chills in the hooks directory, keeping your project looking like a masterpiece.

### Dedicated package.json for dependencies?
Think of it as your own personal spice rack – everything neatly organized and ready to flavor your app just right. No more hunting for that elusive sprinkle of unicorn dust dependency.

Well, that's just next-level meta, who are we to judge brick-ception dreams?

Feel like to contribute to this project? head to github and send me your PRs and Issues [https://github.com/koukibadr/B-Bricks](https://github.com/koukibadr/B-Bricks).

Also head to brickhub page to learn more about easy_deps
[https://brickhub.dev/bricks/easy_deps/0.1.0+1](https://brickhub.dev/bricks/easy_deps/0.1.0+1)