copyWith method

CarpenterCommandState copyWith({
  1. CarpenterCommandVisibility? visibility,
  2. bool? enabled,
  3. String? disabledReason,
  4. CarpenterCommandExecution? execution,
  5. Object? error,
  6. bool clearError = false,
})

Implementation

CarpenterCommandState copyWith({
  CarpenterCommandVisibility? visibility,
  bool? enabled,
  String? disabledReason,
  CarpenterCommandExecution? execution,
  Object? error,
  bool clearError = false,
}) => CarpenterCommandState(
  visibility: visibility ?? this.visibility,
  enabled: enabled ?? this.enabled,
  disabledReason: disabledReason ?? this.disabledReason,
  execution: execution ?? this.execution,
  error: clearError ? null : error ?? this.error,
);