ente/lib/models/search/search_result.dart

29 lines
390 B
Dart
Raw Normal View History

2023-08-25 04:39:30 +00:00
import 'package:photos/models/file/file.dart';
2022-09-14 08:33:12 +00:00
abstract class SearchResult {
ResultType type();
String name();
2023-08-24 16:56:24 +00:00
EnteFile? previewThumbnail();
2022-09-14 08:33:12 +00:00
String heroTag() {
return '${type().toString()}_${name()}';
}
2023-08-24 16:56:24 +00:00
List<EnteFile> resultFiles();
2022-09-14 08:33:12 +00:00
}
enum ResultType {
collection,
file,
location,
month,
year,
fileType,
fileExtension,
2022-11-05 05:30:03 +00:00
fileCaption,
2023-03-07 02:12:54 +00:00
event,
2023-09-22 18:16:16 +00:00
magic,
}