copyWith<T> method
创建副本
Implementation
PreloadTask<T> copyWith<T>({
ProviderListenable<T>? provider,
Future<void> Function()? method,
String? id,
List<String>? dependencies,
Future<bool> Function()? checkBeforeExecute,
Duration? checkRetryDelay,
int? maxCheckRetries,
TaskConfig? config,
}) {
return PreloadTask<T>(
provider: provider ?? (this.provider as ProviderListenable<T>?),
method: method ?? this.method,
id: id ?? _explicitId,
dependencies: dependencies ?? this.dependencies,
checkBeforeExecute: checkBeforeExecute ?? this.checkBeforeExecute,
checkRetryDelay: checkRetryDelay ?? this.checkRetryDelay,
maxCheckRetries: maxCheckRetries ?? this.maxCheckRetries,
config: config ?? this.config,
);
}