jsonIntlBuilder function
Builder
jsonIntlBuilder(
- BuilderOptions options
Implementation
Builder jsonIntlBuilder(BuilderOptions options) {
final pubspec = loadYaml(File('pubspec.yaml').readAsStringSync()) as Map;
var options = GeneratorOptions.builder;
if (pubspec.containsKey('json_intl')) {
final opt = pubspec['json_intl'] as Map;
options = options.copyWith(
className: opt['class_name'],
defaultLocale: opt['default_locale'],
mangle: opt['mangle'],
debug: opt['debug'],
builtin: opt['builtin'],
source: opt['source'],
output: opt['output'],
format: opt['format'],
);
}
return MyBuilder(options);
}