bloc_annotations 0.5.1 copy "bloc_annotations: ^0.5.1" to clipboard
bloc_annotations: ^0.5.1 copied to clipboard

outdated

Annotations for the bloc_generator package that will generate BLoC architected code automatically.

bloc_annotations #

This package is part of a number of packages designed to help create BLoC architected code in Dart and Flutter. You can view them all in the repository here.

This README relies on the fact that you have read the main README.

Installation #

dependencies:
  bloc_annotations: <latest_version>

Input Class #

All the annotated members of your BLoC class that have annotations must be public as the generated code uses them. Members without annotations can still be used normally such as in @BLoCMapper methods. @BLoCValues initial data will not be copied to the BLoC class and will have no effect on the initial data.

Different Controllers #

Using StreamController isn't required so rxdarts subjects such as BehaviourSubject can be used as shown in the example.

Output Class #

The output class can be seen in the generated .bloc.dart file. The BLoCs name will be the same as the template class with the suffix of BLoC.

Importing the Output Class #

The generated .bloc.dart file uses a part of statment, so your template file must contain a part statement.

0
likes
0
pub points
15%
popularity

Publisher

unverified uploader

Annotations for the bloc_generator package that will generate BLoC architected code automatically.

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

meta

More

Packages that depend on bloc_annotations