localization_builder 0.9.4 localization_builder: ^0.9.4 copied to clipboard
A data class builder for localization.
import 'dart:io';
import 'package:localization_builder/localization_builder.dart';
import 'package:yaml/yaml.dart';
Future<void> main() async {
final parser = YamlLocalizationParser();
final yaml = await File('example.yaml').readAsString();
final node = loadYaml(yaml);
final result = parser.parse(node);
final dart =
DartLocalizationBuilder().build(result.result.copyWith(name: 'Example'));
print(dart);
}