From 9781a20b385a944cf7b79bf4cc57c59e80221acd Mon Sep 17 00:00:00 2001 From: Mathis Kirchner Date: Sat, 9 May 2026 17:36:18 +0200 Subject: [PATCH] implement dragging animation --- .../match_view/match_result_view.dart | 40 +++++++++++++++++-- 1 file changed, 36 insertions(+), 4 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 33c319d..f0c6fb4 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 @@ -227,10 +227,42 @@ class _MatchResultViewState extends State { physics: const NeverScrollableScrollPhysics(), padding: EdgeInsets.zero, proxyDecorator: (child, index, animation) { - return Material( - color: Colors.transparent, - elevation: 8, - child: Opacity(opacity: 0.9, child: child), + return AnimatedBuilder( + animation: animation, + 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, + ), + BoxShadow( + color: CustomTheme + .primaryColor + .withAlpha(18), + blurRadius: 12, + spreadRadius: 2, + ), + ], + ), + child: child, + ), + ), + ); + }, + child: child, ); }, onReorder: (int oldIndex, int newIndex) {