Prop2Dart
A tool for generating dart classes from .properties
files.
1. Get the generator
The code generator is written is python so, you should have python3
.
- clone the repo:
git clone https://codeberg.org/wiedercomma/prop2dart
- get python requirements:
python3 -m pip install -r requirements.txt
- add the tool to your path:
export PATH="$PATH:/path/to/prop2dart"
2. Generate the properties files:
prop2dart hello_world.properties
This will generate files under a folder named: __generated__
, also the generated files need the library prop2dart
that you can get from pub.dev:
In your pub.spec
file:
prop2dart:
Examples:
https://codeberg.org/wiedercomma/prop2dart/src/branch/master/prop2dart/example/bin/example.dart