mirror of
https://github.com/immich-app/immich.git
synced 2024-12-28 11:15:54 +02:00
d76baee50d
* Refactor to use ImmichThumbnail and local thumbnail image provider format * dart format linter errors linter * Adds blurhash format * Fixes image blur * uses hook instead of stateful widget to be more consistent * Uses blurhash hook state * Uses blurhash ref instead of state * Fixes fade in duration for fade in placeholder * Fixes an issue where thumbnails fail to load if too many thumbnail requests are made simultaenously --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
29 lines
720 B
Dart
29 lines
720 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
import 'package:immich_mobile/shared/models/asset.dart';
|
|
import 'package:immich_mobile/shared/ui/immich_thumbnail.dart';
|
|
|
|
class SharedAlbumThumbnailImage extends HookConsumerWidget {
|
|
final Asset asset;
|
|
|
|
const SharedAlbumThumbnailImage({super.key, required this.asset});
|
|
|
|
@override
|
|
Widget build(BuildContext context, WidgetRef ref) {
|
|
return GestureDetector(
|
|
onTap: () {
|
|
// debugPrint("View ${asset.id}");
|
|
},
|
|
child: Stack(
|
|
children: [
|
|
ImmichThumbnail(
|
|
asset: asset,
|
|
width: 500,
|
|
height: 500,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|