ArgumentParser constructor
Implementation
ArgumentParser(this.arguments) {
void addOption(Option element) {
argParser.addOption(
element.name,
abbr: element.abbr,
defaultsTo: element.defaultValue.toString(),
callback: (String? v) {
if (v == 'false') {
element.value = false;
} else if (v == 'true') {
element.value = true;
} else if (v != null) {
element.value = v;
}
},
help: element.help,
);
}
result.options.forEach(addOption);
}