bunker_lib 1.0.2 copy "bunker_lib: ^1.0.2" to clipboard
bunker_lib: ^1.0.2 copied to clipboard

outdated

A Library for lessen boilerplate code. Inpsired from freezed and lombok.

Welcome to [Bunker], yet another code generator for unions/pattern-matching/copy.

1.0.1 and null-safety #

Important note:

dependencies:
  bunker_annotation: ^0.0.3

dev_dependencies:
  bunker_lib: ^1.0.1

Run the generator #

To run the code generator you have two possibilities:

  • If your package depends on Flutter:
    • flutter pub run build_runner build
  • If your package does not depend on Flutter:
    • dart pub run build_runner build

Note that like most code-generators, [Bunker] will need you to both import the annotation ([meta]) and use the part keyword on the top of your files.

copyWith #

As stated in the very beginning of this readme, [Freezed] does not compromise on the syntax to have a powerful copy.

The copyWith method generated by [Freezed] does support assigning a value to null.
For example, if we take our previous Model class:

@BunkerAnnotation()
class Model with _$Model {
  factory Model(String name, int age);
}
0
likes
0
pub points
7%
popularity

Publisher

verified publisheropensource.appworld.in

A Library for lessen boilerplate code. Inpsired from freezed and lombok.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

analyzer, build, build_config, bunker_annotation, collection, flutter, meta, source_gen

More

Packages that depend on bunker_lib