AnthropicFile.fromJson constructor
Implementation
factory AnthropicFile.fromJson(Map<String, dynamic> json) {
return AnthropicFile(
id: json['id'] as String,
filename: json['filename'] as String,
mimeType: json['mime_type'] as String,
sizeBytes: json['size_bytes'] as int,
createdAt: DateTime.parse(json['created_at'] as String),
downloadable: json['downloadable'] as bool? ?? false,
type: json['type'] as String? ?? 'file',
);
}