copyWith method
Workflow
copyWith({
- String? id,
- String? name,
- String? description,
- List<
WorkflowStep> ? steps, - String? startStepId,
- Map<
String, dynamic> ? initialData, - WorkflowStatus? status,
- DateTime? createdAt,
- DateTime? updatedAt,
- String? version,
- int? priority,
- bool? isEnabled,
- List<
String> ? tags, - Map<
String, String> ? metadata, - Map<
String, dynamic> ? triggerConditions, - int? maxRetries,
- Duration? executionTimeout,
Implementation
Workflow copyWith({
String? id,
String? name,
String? description,
List<WorkflowStep>? steps,
String? startStepId,
Map<String, dynamic>? initialData,
WorkflowStatus? status,
DateTime? createdAt,
DateTime? updatedAt,
String? version,
int? priority,
bool? isEnabled,
List<String>? tags,
Map<String, String>? metadata,
Map<String, dynamic>? triggerConditions,
int? maxRetries,
Duration? executionTimeout,
}) {
return Workflow(
id: id ?? this.id,
name: name ?? this.name,
description: description ?? this.description,
steps: steps ?? this.steps,
startStepId: startStepId ?? this.startStepId,
initialData: initialData ?? this.initialData,
status: status ?? this.status,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
version: version ?? this.version,
priority: priority ?? this.priority,
isEnabled: isEnabled ?? this.isEnabled,
tags: tags ?? this.tags,
metadata: metadata ?? this.metadata,
triggerConditions: triggerConditions ?? this.triggerConditions,
maxRetries: maxRetries ?? this.maxRetries,
executionTimeout: executionTimeout ?? this.executionTimeout,
);
}