2022-09-14 08:33:12 +00:00
|
|
|
import 'package:photos/models/file.dart';
|
|
|
|
|
|
|
|
abstract class SearchResult {
|
|
|
|
ResultType type();
|
|
|
|
|
|
|
|
String name();
|
|
|
|
|
2022-10-19 11:56:06 +00:00
|
|
|
File? previewThumbnail();
|
2022-09-14 08:33:12 +00:00
|
|
|
|
|
|
|
String heroTag() {
|
|
|
|
return '${type().toString()}_${name()}';
|
|
|
|
}
|
|
|
|
|
|
|
|
List<File> resultFiles();
|
|
|
|
}
|
|
|
|
|
2022-09-15 04:44:09 +00:00
|
|
|
enum ResultType {
|
|
|
|
collection,
|
|
|
|
file,
|
|
|
|
location,
|
|
|
|
month,
|
|
|
|
year,
|
|
|
|
fileType,
|
|
|
|
fileExtension,
|
2022-11-05 05:30:03 +00:00
|
|
|
fileCaption,
|
2022-09-15 04:44:09 +00:00
|
|
|
event
|
|
|
|
}
|