Handle case where in the search results could not be fetched

This commit is contained in:
Vishnu Mohandas 2020-07-15 13:47:30 +05:30
parent bde40929be
commit e96f5f0a1f

View file

@ -48,6 +48,9 @@ class FaceSearchManager {
.toList();
}).catchError(_onError);
final files = List<File>();
if (result == null) {
return throw ("Oops. Could not fetch search results.");
}
for (File file in result) {
try {
files.add(await FileDB.instance.getMatchingFile(