yaml2dart 1.0.7 yaml2dart: ^1.0.7 copied to clipboard
Converts a YAML file to a Dart file containing global scope constants. Especially good for pubspec.yaml.
example/yaml2dart_example.dart
import 'package:yaml2dart/yaml2dart.dart';
void main() async {
// Create a converter instance with the input and output file paths.
final converter = Yaml2Dart('example.yaml', 'example_constants.dart');
// Convert the YAML to Dart.
await converter.convert();
}