copyWith method
ModelInfo
copyWith({
- String? id,
- String? name,
- ModelCategory? category,
- ModelFormat? format,
- InferenceFramework? framework,
- Uri? downloadURL,
- Uri? localPath,
- ModelArtifactType? artifactType,
- int? downloadSize,
- int? contextLength,
- bool? supportsThinking,
- ThinkingTagPattern? thinkingPattern,
- String? description,
- ModelSource? source,
- DateTime? createdAt,
- DateTime? updatedAt,
Copy with modifications
Implementation
ModelInfo copyWith({
String? id,
String? name,
ModelCategory? category,
ModelFormat? format,
InferenceFramework? framework,
Uri? downloadURL,
Uri? localPath,
ModelArtifactType? artifactType,
int? downloadSize,
int? contextLength,
bool? supportsThinking,
ThinkingTagPattern? thinkingPattern,
String? description,
ModelSource? source,
DateTime? createdAt,
DateTime? updatedAt,
}) {
return ModelInfo(
id: id ?? this.id,
name: name ?? this.name,
category: category ?? this.category,
format: format ?? this.format,
framework: framework ?? this.framework,
downloadURL: downloadURL ?? this.downloadURL,
localPath: localPath ?? this.localPath,
artifactType: artifactType ?? this.artifactType,
downloadSize: downloadSize ?? this.downloadSize,
contextLength: contextLength ?? this.contextLength,
supportsThinking: supportsThinking ?? this.supportsThinking,
thinkingPattern: thinkingPattern ?? this.thinkingPattern,
description: description ?? this.description,
source: source ?? this.source,
createdAt: createdAt ?? this.createdAt,
updatedAt: updatedAt ?? this.updatedAt,
);
}