copyWith method
CommandContext<O, T>
copyWith({
- AbstractCommand<
O, T> ? command, - Configuration<
O> ? config, - Configuration<
BuiltinGlobalOption< ? builtinConfig,Object> > - CommandContext<
OptionDefinition, T> ? prev, - CommandContext<
OptionDefinition, T> ? next, - ContextProvider? provider,
- CommandRunMode? runMode,
Implementation
CommandContext<O, T> copyWith({
final AbstractCommand<O, T>? command,
final Configuration<O>? config,
final Configuration<BuiltinGlobalOption>? builtinConfig,
final CommandContext<OptionDefinition, T>? prev,
final CommandContext<OptionDefinition, T>? next,
final ContextProvider? provider,
final CommandRunMode? runMode,
}) {
return CommandContext<O, T>(
command: command ?? this.command,
config: config ?? this.config,
builtinConfig: builtinConfig ?? this.builtinConfig,
prev: prev ?? this.prev,
provider: provider ?? this.provider,
runMode: runMode ?? this.runMode,
)..next = next ?? this.next;
}