copyWith method

ArgConfig copyWith({
  1. String? longPrefix,
  2. String? shortPrefix,
  3. bool? noOptionsAfterPositional,
  4. String? disableOptionsAfter,
  5. InverseGenerator? inverseGenerator,
})

Creates a copy of this configuration, with any non-null parameters changed to the new values. As null is used to signify the lack of a new value, this function cannot be used to unset configuration parameters; use copyWithout() for that instead.

Implementation

ArgConfig copyWith(
        {String? longPrefix,
        String? shortPrefix,
        bool? noOptionsAfterPositional,
        String? disableOptionsAfter,
        InverseGenerator? inverseGenerator}) =>
    ArgConfig(
        longPrefix: longPrefix ?? this.longPrefix,
        shortPrefix: shortPrefix ?? this.shortPrefix,
        noOptionsAfterPositional:
            noOptionsAfterPositional ?? this.noOptionsAfterPositional,
        disableOptionsAfter: disableOptionsAfter ?? this.disableOptionsAfter,
        inverseGenerator: inverseGenerator ?? this.inverseGenerator);