newOption function

Option newOption(
  1. String name,
  2. String? abbr,
  3. String? help,
  4. String? valueHelp,
  5. Iterable<String>? allowed,
  6. Map<String, String>? allowedHelp,
  7. dynamic defaultsTo,
  8. Function? callback,
  9. OptionType type, {
  10. bool? negatable,
  11. bool? splitCommas,
  12. bool mandatory = false,
  13. bool hide = false,
  14. List<String> aliases = const [],
})

Creates a new Option.

Since Option doesn't have a public constructor, this lets ArgParser get to it. This function isn't exported to the public API of the package.

Implementation

Option newOption(String name, String? abbr, String? help, String? valueHelp, Iterable<String>? allowed,
    Map<String, String>? allowedHelp, defaultsTo, Function? callback, OptionType type,
    {bool? negatable, bool? splitCommas, bool mandatory = false, bool hide = false, List<String> aliases = const []}) {
  return Option._(name, abbr, help, valueHelp, allowed, allowedHelp, defaultsTo, callback, type,
      negatable: negatable, splitCommas: splitCommas, mandatory: mandatory, hide: hide, aliases: aliases);
}