1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-04 02:46:47 +01:00

Adds padding and hero to memories

This commit is contained in:
Marty Fuhry 2024-02-04 14:00:30 -05:00
parent 4fa55f0e0b
commit b8edc7114e
No known key found for this signature in database
GPG key ID: E2AB6392D894D900

View file

@ -16,19 +16,22 @@ class MemoryLane extends HookConsumerWidget {
final memoryLane = memoryLaneFutureProvider
.whenData(
(memories) => memories != null
? Container(
margin: const EdgeInsets.only(top: 10, left: 10),
? SizedBox(
height: 200,
child: ListView.builder(
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: memories.length,
padding: const EdgeInsets.only(
right: 8.0,
bottom: 8,
top: 10,
left: 10,
),
itemBuilder: (context, index) {
final memory = memories[index];
return Padding(
padding: const EdgeInsets.only(right: 8.0, bottom: 8),
child: GestureDetector(
return GestureDetector(
onTap: () {
HapticFeedback.heavyImpact();
context.pushRoute(
@ -51,6 +54,8 @@ class MemoryLane extends HookConsumerWidget {
Colors.black.withOpacity(0.2),
BlendMode.darken,
),
child: Hero(
tag: memory.assets[0].id,
child: ImmichImage(
memory.assets[0],
fit: BoxFit.cover,
@ -61,6 +66,7 @@ class MemoryLane extends HookConsumerWidget {
),
),
),
),
Positioned(
bottom: 16,
left: 16,
@ -80,7 +86,6 @@ class MemoryLane extends HookConsumerWidget {
),
],
),
),
);
},
),