change return type of cacheKey() to non-nullable

This commit is contained in:
ashilkn 2022-09-15 16:34:33 +05:30
parent ee308d34ff
commit 932d055d8e
2 changed files with 2 additions and 3 deletions

View file

@ -4,5 +4,5 @@
abstract class EnteFile {
// returns cacheKey which should be used while caching entry related to
// this file.
String? cacheKey();
String cacheKey();
}

View file

@ -275,9 +275,8 @@ class File extends EnteFile {
}
@override
//add nullable return type when migrating to null safety
String cacheKey() {
// todo: Neeraj: 19thJuly'22: evaluate and add fileHash as the key?
return localID ?? uploadedFileID?.toString() ?? generatedID?.toString();
return localID ?? uploadedFileID?.toString() ?? generatedID.toString();
}
}