Open StanevPrime opened 2 weeks ago
While investigating in this task I found a few points to be taken into consideration:
For now, this task will be put on hold. Since its implementation might coincide with the production release of macros, we likely won’t have the opportunity to use it before reworking the entire package to incorporate macros.
As a developer I want to use @RxCoordinatorBloc() and @RxCoordinatorBroadcastState() annotations so that I have central place for all annotated states and reduce the code I need to write in the CoordinatorBloc.
ACs
Step 1: Use the
@RxCoordinatorBloc()
annotation to enable coordinator-specific code generation.The generator will scan for all
@RxCoordinatorBloc()
annotated blocs and will automatically generate states in the $CoordinatorBloc, such as$CoordinatorBloc.$profile.states.onProfileChanged
coordinator_bloc.rxb.g.dart
Step 2: Annotate the states that should be available in the coordinator bloc
profile_bloc.rxb.g.dart
Use cases
Use case 1: Use state listeners for debugging purposes through logs
Use case 2: Use the generated states in the other blocs