From 3bf0d5b99f90f49e767b981429b60c24daa5fa4b Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 12 Jan 2026 11:07:33 -0600 Subject: [PATCH] fix: asset local type casting (#25214) --- .../bottom_sheet/sheet_location_details.widget.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet/sheet_location_details.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet/sheet_location_details.widget.dart index 664cdb358d..c0343d03ca 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet/sheet_location_details.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet/sheet_location_details.widget.dart @@ -64,11 +64,10 @@ class _SheetLocationDetailsState extends ConsumerState { final hasCoordinates = exifInfo?.hasCoordinates ?? false; // Guard local assets - if (asset != null && asset is LocalAsset && asset.hasRemote) { + if (asset is! RemoteAsset) { return const SizedBox.shrink(); } - final remoteAsset = asset as RemoteAsset; final locationName = _getLocationName(exifInfo); final coordinates = "${exifInfo?.latitude?.toStringAsFixed(4)}, ${exifInfo?.longitude?.toStringAsFixed(4)}"; @@ -94,8 +93,8 @@ class _SheetLocationDetailsState extends ConsumerState { children: [ ExifMap( exifInfo: exifInfo!, - markerId: remoteAsset.id, - markerAssetThumbhash: remoteAsset.thumbHash, + markerId: asset.id, + markerAssetThumbhash: asset.thumbHash, onMapCreated: _onMapCreated, ), const SizedBox(height: 16),