Fix exception when lastModified = null

This commit is contained in:
Ming Ming 2021-07-16 17:28:34 +08:00
parent 368a6a6755
commit 3054bfaf9c

View file

@ -410,7 +410,10 @@ class File with EquatableMixin {
extension FileExtension on File { extension FileExtension on File {
DateTime get bestDateTime { DateTime get bestDateTime {
return overrideDateTime ?? metadata?.exif?.dateTimeOriginal ?? lastModified; return overrideDateTime ??
metadata?.exif?.dateTimeOriginal ??
lastModified ??
DateTime.now().toUtc();
} }
} }