diff --git a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart index ea7ff51fa6..abb7b779fe 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/asset_page.widget.dart @@ -292,7 +292,6 @@ class _AssetPageState extends ConsumerState { required PhotoViewHeroAttributes? heroAttributes, required bool isCurrent, required bool isPlayingMotionVideo, - required BoxDecoration backgroundDecoration, }) { final size = context.sizeData; @@ -303,7 +302,6 @@ class _AssetPageState extends ConsumerState { imageProvider: getFullImageProvider(asset, size: size), heroAttributes: heroAttributes, loadingBuilder: (context, progress, index) => const Center(child: ImmichLoadingIndicator()), - backgroundDecoration: backgroundDecoration, gaplessPlayback: true, filterQuality: FilterQuality.high, tightMode: true, @@ -345,7 +343,6 @@ class _AssetPageState extends ConsumerState { tightMode: true, onPageBuild: _onPageBuild, enablePanAlways: true, - backgroundDecoration: backgroundDecoration, child: NativeVideoViewer( key: _NativeVideoViewerKey(asset.heroTag), asset: asset, @@ -397,41 +394,43 @@ class _AssetPageState extends ConsumerState { SingleChildScrollView( controller: _scrollController, physics: const SnapScrollPhysics(), - child: Stack( - children: [ - SizedBox( - width: viewportWidth, - height: viewportHeight, - child: _buildPhotoView( - asset: displayAsset, - heroAttributes: isCurrent - ? PhotoViewHeroAttributes(tag: '${asset.heroTag}_${widget.heroOffset}') - : null, - isCurrent: isCurrent, - isPlayingMotionVideo: isPlayingMotionVideo, - backgroundDecoration: BoxDecoration(color: _showingDetails ? Colors.black : Colors.transparent), + child: ColoredBox( + color: _showingDetails ? Colors.black : Colors.transparent, + child: Stack( + children: [ + SizedBox( + width: viewportWidth, + height: viewportHeight, + child: _buildPhotoView( + asset: displayAsset, + heroAttributes: isCurrent + ? PhotoViewHeroAttributes(tag: '${asset.heroTag}_${widget.heroOffset}') + : null, + isCurrent: isCurrent, + isPlayingMotionVideo: isPlayingMotionVideo, + ), ), - ), - IgnorePointer( - ignoring: !_showingDetails, - child: Column( - children: [ - SizedBox(height: detailsOffset), - GestureDetector( - onVerticalDragStart: _beginDrag, - onVerticalDragUpdate: _updateDrag, - onVerticalDragEnd: _endDrag, - onVerticalDragCancel: _onDragCancel, - child: AnimatedOpacity( - opacity: _showingDetails ? 1.0 : 0.0, - duration: Durations.short2, - child: AssetDetails(asset: displayAsset, minHeight: viewportHeight - snapTarget), + IgnorePointer( + ignoring: !_showingDetails, + child: Column( + children: [ + SizedBox(height: detailsOffset), + GestureDetector( + onVerticalDragStart: _beginDrag, + onVerticalDragUpdate: _updateDrag, + onVerticalDragEnd: _endDrag, + onVerticalDragCancel: _onDragCancel, + child: AnimatedOpacity( + opacity: _showingDetails ? 1.0 : 0.0, + duration: Durations.short2, + child: AssetDetails(asset: displayAsset, minHeight: viewportHeight - snapTarget), + ), ), - ), - ], + ], + ), ), - ), - ], + ], + ), ), ), if (stackChildren != null && stackChildren.isNotEmpty)