This commit is contained in:
Noel S
2025-12-08 18:36:59 -08:00
parent 45a0315606
commit c3c4157d2b
@@ -13,12 +13,20 @@ import 'package:octo_image/octo_image.dart';
import 'package:immich_mobile/providers/user.provider.dart'; import 'package:immich_mobile/providers/user.provider.dart';
class ImmichThumbnail extends HookConsumerWidget { class ImmichThumbnail extends HookConsumerWidget {
const ImmichThumbnail({this.asset, this.width = 250, this.height = 250, this.fit = BoxFit.cover, super.key}); const ImmichThumbnail({
this.asset,
this.width = 250,
this.height = 250,
this.fit = BoxFit.cover,
super.key,
this.placeholderEnabled = true,
});
final Asset? asset; final Asset? asset;
final double width; final double width;
final double height; final double height;
final BoxFit fit; final BoxFit fit;
final bool placeholderEnabled;
/// Helper function to return the image provider for the asset thumbnail /// Helper function to return the image provider for the asset thumbnail
/// either by using the asset ID or the asset itself /// either by using the asset ID or the asset itself
@@ -47,7 +55,7 @@ class ImmichThumbnail extends HookConsumerWidget {
if (asset == null) { if (asset == null) {
return Container( return Container(
color: Colors.grey, color: Colors.black,
width: width, width: width,
height: height, height: height,
child: const Center(child: Icon(Icons.no_photography)), child: const Center(child: Icon(Icons.no_photography)),