mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 03: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
|
final memoryLane = memoryLaneFutureProvider
|
||||||
.whenData(
|
.whenData(
|
||||||
(memories) => memories != null
|
(memories) => memories != null
|
||||||
? Container(
|
? SizedBox(
|
||||||
margin: const EdgeInsets.only(top: 10, left: 10),
|
|
||||||
height: 200,
|
height: 200,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemCount: memories.length,
|
itemCount: memories.length,
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
right: 8.0,
|
||||||
|
bottom: 8,
|
||||||
|
top: 10,
|
||||||
|
left: 10,
|
||||||
|
),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final memory = memories[index];
|
final memory = memories[index];
|
||||||
|
|
||||||
return Padding(
|
return GestureDetector(
|
||||||
padding: const EdgeInsets.only(right: 8.0, bottom: 8),
|
|
||||||
child: GestureDetector(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
HapticFeedback.heavyImpact();
|
HapticFeedback.heavyImpact();
|
||||||
context.pushRoute(
|
context.pushRoute(
|
||||||
|
@ -51,6 +54,8 @@ class MemoryLane extends HookConsumerWidget {
|
||||||
Colors.black.withOpacity(0.2),
|
Colors.black.withOpacity(0.2),
|
||||||
BlendMode.darken,
|
BlendMode.darken,
|
||||||
),
|
),
|
||||||
|
child: Hero(
|
||||||
|
tag: memory.assets[0].id,
|
||||||
child: ImmichImage(
|
child: ImmichImage(
|
||||||
memory.assets[0],
|
memory.assets[0],
|
||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
|
@ -61,6 +66,7 @@ class MemoryLane extends HookConsumerWidget {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
Positioned(
|
Positioned(
|
||||||
bottom: 16,
|
bottom: 16,
|
||||||
left: 16,
|
left: 16,
|
||||||
|
@ -80,7 +86,6 @@ class MemoryLane extends HookConsumerWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue