Reveal full next card behind opaque deck front

This commit is contained in:
2026-11-07 19:51:10 +00:00
parent f6491e995f
commit 0f2711e8fa
4 changed files with 36 additions and 5 deletions
@@ -27,6 +27,9 @@ class ChatSwitchCard extends StatelessWidget {
final shadow = usesCupertinoHost(context)
? CupertinoColors.black
: Theme.of(context).shadowColor;
final surface = usesCupertinoHost(context)
? CupertinoTheme.of(context).scaffoldBackgroundColor
: Theme.of(context).colorScheme.surface;
return LayoutBuilder(
builder: (context, constraints) => Opacity(
opacity: pose.opacity,
@@ -35,6 +38,7 @@ class ChatSwitchCard extends StatelessWidget {
transform: pose.transform(constraints.biggest),
child: DecoratedBox(
decoration: BoxDecoration(
color: motion.isAnimating && !motion.isTape ? surface : null,
boxShadow: [
BoxShadow(
color: shadow.withValues(alpha: .24 * pose.shadow),