ShellParameter constructor
const
ShellParameter({
- required String flag,
- required String name,
- bool required = false,
- String? defaultValue,
- 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,
});