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:
parent
4fa55f0e0b
commit
b8edc7114e
1 changed files with 46 additions and 41 deletions
|
@ -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 {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue