Reveal full next card behind opaque deck front
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user