2023-10-03 14:11:59 -06:00
|
|
|
import 'package:wonders/logic/data/artifact_data.dart';
|
|
|
|
|
2022-08-29 20:38:28 -06:00
|
|
|
class SearchData {
|
2023-10-03 14:11:59 -06:00
|
|
|
const SearchData(this.year, this.id, this.title, this.keywords, [this.aspectRatio = 0]);
|
|
|
|
|
2022-08-29 20:38:28 -06:00
|
|
|
final int year;
|
|
|
|
final int id;
|
|
|
|
final String keywords;
|
|
|
|
final String title;
|
|
|
|
final double aspectRatio;
|
|
|
|
|
2023-10-03 14:11:59 -06:00
|
|
|
String get imageUrl => ArtifactData.getSelfHostedImageUrl('$id');
|
|
|
|
String get imageUrlSmall => ArtifactData.getSelfHostedImageUrlSmall('$id');
|
2022-08-29 20:38:28 -06:00
|
|
|
|
|
|
|
// used by the search helper tool:
|
2023-10-03 14:11:59 -06:00
|
|
|
String write() => "SearchData($year, $id, '$title', '$keywords')";
|
2022-08-29 20:38:28 -06:00
|
|
|
}
|