From 496d411af625340cdda0691adddaf2fa4a9ae7bb Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Sat, 9 May 2026 18:37:02 +0200 Subject: [PATCH] feat: updated drag effect --- .../match_view/match_result_view.dart | 51 +++++++++---------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/lib/presentation/views/main_menu/match_view/match_result_view.dart b/lib/presentation/views/main_menu/match_view/match_result_view.dart index 839d109..1c907a4 100644 --- a/lib/presentation/views/main_menu/match_view/match_result_view.dart +++ b/lib/presentation/views/main_menu/match_view/match_result_view.dart @@ -229,40 +229,35 @@ class _MatchResultViewState extends State { proxyDecorator: (child, index, animation) { return AnimatedBuilder( animation: animation, + child: child, builder: (context, child) { - final t = Curves.easeInOut.transform( - animation.value, - ); - return Opacity( - opacity: t, - child: Material( - color: Colors.transparent, - child: Container( - decoration: BoxDecoration( - borderRadius: CustomTheme - .standardBorderRadiusAll, - boxShadow: [ - BoxShadow( - color: CustomTheme - .primaryColor - .withAlpha(30), - blurRadius: 4, + final alpha = + (Curves.easeInOut.transform( + animation.value, + ) * + 40) + .toInt(); + return Stack( + children: [ + child!, + Positioned.fill( + left: 4, + top: 4, + right: 4, + bottom: 4, + child: DecoratedBox( + decoration: BoxDecoration( + color: Colors.white.withAlpha( + alpha, ), - BoxShadow( - color: CustomTheme - .primaryColor - .withAlpha(18), - blurRadius: 12, - spreadRadius: 2, - ), - ], + borderRadius: CustomTheme + .standardBorderRadiusAll, + ), ), - child: child, ), - ), + ], ); }, - child: child, ); }, onReorder: (int oldIndex, int newIndex) {