Skip to content

Commit a6b8482

Browse files
Adam Fiskclaude
andcommitted
share: render Lottie arrival heart-burst at native canvas size
Lottie's explosion.json is 420×502; we were forcing it into a 420×420 Positioned with BoxFit.contain, which uniform-scaled the animation down by ~83% and lopped 82 px off the upward spread. End result: the hearts clustered tightly just above the pill instead of fanning out across the globe the way unbounded.lantern.io's CSS renders them (width:420 with height:auto preserves the native aspect ratio). Set height to 502 to match the native canvas exactly. Width and the bottom/left negative offsets stay the same — the bottom of the Lottie still anchors 55 px below the pill heart's bottom and 105 px left of its left edge. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8f826ab commit a6b8482

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

lib/features/share_my_connection/share_my_connection.dart

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,15 +1119,19 @@ class _ArrivalCard extends StatelessWidget {
11191119
alignment: Alignment.center,
11201120
children: const [
11211121
// Lottie spreads upward + rightward from the heart.
1122-
// height is auto from BoxFit.contain on its 420-wide
1123-
// canvas; explosion.json is roughly square so ~420
1124-
// tall, but most of that is above the heart due to
1125-
// the negative bottom offset.
1122+
// The size matches explosion.json's native 420×502
1123+
// canvas — unbounded.lantern.io's CSS uses width:420
1124+
// with height:auto for the same effect. Forcing the
1125+
// height to 420 (as we did before) scaled the
1126+
// animation down by ~83% via BoxFit.contain and lost
1127+
// ~82px of upward spread, leaving the hearts visibly
1128+
// smaller and clustered just above the pill instead
1129+
// of fanning out across the globe.
11261130
Positioned(
11271131
bottom: -55,
11281132
left: -105,
11291133
width: 420,
1130-
height: 420,
1134+
height: 502,
11311135
child: _ArrivalLottie(),
11321136
),
11331137
CustomPaint(painter: _HeartPainter()),

0 commit comments

Comments
 (0)