copyWith method
Creates a copy with optional overrides
Implementation
AIState<T> copyWith({
T? data,
bool? loading,
Exception? error,
AIStatus? status,
int? progress,
CostSummary? cost,
bool? budgetExceeded,
}) {
return AIState<T>(
data: data ?? this.data,
loading: loading ?? this.loading,
error: error ?? this.error,
status: status ?? this.status,
progress: progress ?? this.progress,
cost: cost ?? this.cost,
budgetExceeded: budgetExceeded ?? this.budgetExceeded,
);
}