0 purchases
bare codegen
BARE Code generator #
The code generator transforms all *.bare files into
*.dart
*.bare.dart
It produces the necessary classes and the extension methods.
After running the code generator with
$ dart run build_runner build
copied to clipboard
To encode a class
<class_name>.toBare
copied to clipboard
To decode to a class
<class_name>.fromBare(bytes)
copied to clipboard
See the example folder for a sample of a schema file and the generated code.
Code generator config options: #
to_string - Generate toString override for the generated classes. Default - True
targets:
$default:
builders:
bare_codegen|bareGenerator:
options:
to_string: True
copied to clipboard
To run the project: #
Update your dependencies:
$ cd bare && pub get
$ cd bare_codegen && pub get
$ cd example && pub get
copied to clipboard
cd into example and run build process and run tests:
$ dart run build_runner build
$ dart test
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.