From e7f0b406028f05bba52a495bdd0239fc6f79f23a Mon Sep 17 00:00:00 2001 From: Thibault Deckers Date: Tue, 13 Oct 2020 16:24:40 +0900 Subject: [PATCH] static analysis fix --- lib/model/image_entry.dart | 6 +++--- lib/widgets/fullscreen/image_view.dart | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/model/image_entry.dart b/lib/model/image_entry.dart index bb0db6c5d..0315ea393 100644 --- a/lib/model/image_entry.dart +++ b/lib/model/image_entry.dart @@ -387,7 +387,7 @@ class ImageEntry { final newFields = await ImageFileService.rename(this, '$newName$extension'); if (newFields.isEmpty) return false; - _applyNewFields(newFields); + await _applyNewFields(newFields); _bestTitle = null; metadataChangeNotifier.notifyListeners(); return true; @@ -400,7 +400,7 @@ class ImageEntry { final oldDateModifiedSecs = dateModifiedSecs; final oldRotationDegrees = rotationDegrees; final oldIsFlipped = isFlipped; - _applyNewFields(newFields); + await _applyNewFields(newFields); await _onImageChanged(oldDateModifiedSecs, oldRotationDegrees, oldIsFlipped); return true; } @@ -412,7 +412,7 @@ class ImageEntry { final oldDateModifiedSecs = dateModifiedSecs; final oldRotationDegrees = rotationDegrees; final oldIsFlipped = isFlipped; - _applyNewFields(newFields); + await _applyNewFields(newFields); await _onImageChanged(oldDateModifiedSecs, oldRotationDegrees, oldIsFlipped); return true; } diff --git a/lib/widgets/fullscreen/image_view.dart b/lib/widgets/fullscreen/image_view.dart index fb3563d90..e92c2b61a 100644 --- a/lib/widgets/fullscreen/image_view.dart +++ b/lib/widgets/fullscreen/image_view.dart @@ -57,9 +57,7 @@ class ImageView extends StatelessWidget { // if the hero tag wraps the whole `PhotoView` and the `loadingBuilder` is not provided, // there's a black frame between the hero animation and the final image, even when it's cached. - final fastThumbnailProvider = ThumbnailProvider( - ThumbnailProviderKey.fromEntry(entry) - ); + final fastThumbnailProvider = ThumbnailProvider(ThumbnailProviderKey.fromEntry(entry)); // this loading builder shows a transition image until the final image is ready // if the image is already in the cache it will show the final image, otherwise the thumbnail // in any case, we should use `Center` + `AspectRatio` + `Fill` so that the transition image