18 lines
533 B
Dart
Raw Normal View History

import 'package:wonders/logic/data/artifact_data.dart';
2022-08-29 20:38:28 -06:00
class SearchData {
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;
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:
String write() => "SearchData($year, $id, '$title', '$keywords')";
2022-08-29 20:38:28 -06:00
}