addOption method

void addOption(
  1. O option, {
  2. bool? persistent,
})
inherited

Adds an option to this command. persistent indicates whether the option should be persistent across this command's subcommands.

Implementation

void addOption(final O option, {final bool? persistent}) {
  if (persistent == true) {
    persistentOptions.add(option);
  } else {
    options.add(option);
  }
}