felangel / felangel/bloc

feat: adding option to add events/states to a new bloc created by mason

Open
#3,487 0 comments 0 reactions 0 assignees View on GitHub
bricks enhancement
Dominant language
Dart
Stars
12.5k
Forks
3.4k
PR merge metrics
No merged PRs in 30d

Description

**Description**

At this moment in version 0.1.3+2 of the bloc brick you don't have a option to add additional events/states to a bloc.

**Desired Solution**

I would like to have a option to add events/states in the mason CLI when you create a bloc brick.

**Alternatives Considered**

No alternative.

**Additional Context**

Maybe add the option to add arguments to the states/evenst. Will be a challenge but may something to be considered.

example:

? Do you want to add events to your bloc? (Y/n): Y
enter "e" to exit adding events
Format: Name e.g, CartLoading:
What will be the name of your event?: CartLoading
What Will be the name of your event?: CartLoaded
What will be the name of your event?: CartError

and the output will be like [this](https://github.com/felangel/bloc/blob/master/examples/flutter_shopping_cart/lib/cart/bloc/cart_state.dart)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.