ShellParameter constructor

const ShellParameter({
  1. required String flag,
  2. required String name,
  3. bool required = false,
  4. String? defaultValue,
  5. ParameterType type = ParameterType.value,
})

Creates a ShellParameter with the specified properties.

flag is the command-line flag associated with this parameter (e.g., -f or --file). name is the name of the parameter. required indicates whether this parameter is mandatory. Defaults to false. defaultValue specifies the default value for the parameter if not provided. type defines the type of the parameter, defaulting to ParameterType.value.

Implementation

const ShellParameter({
  required this.flag,
  required this.name,
  this.required = false,
  this.defaultValue,
  this.type = ParameterType.value,
});