From 349ff948defb9b668d6783511fcdadd048a09a20 Mon Sep 17 00:00:00 2001 From: Felix Kirchner Date: Fri, 9 Jan 2026 19:50:44 +0100 Subject: [PATCH] Modified match tile --- .../main_menu/match_view/match_view.dart | 29 ++++++++++--------- .../widgets/tiles/match_tile.dart | 12 ++++++-- pubspec.yaml | 7 +---- 3 files changed, 27 insertions(+), 21 deletions(-) diff --git a/lib/presentation/views/main_menu/match_view/match_view.dart b/lib/presentation/views/main_menu/match_view/match_view.dart index 45b957f..108b592 100644 --- a/lib/presentation/views/main_menu/match_view/match_view.dart +++ b/lib/presentation/views/main_menu/match_view/match_view.dart @@ -78,20 +78,23 @@ class _MatchViewState extends State { height: MediaQuery.paddingOf(context).bottom - 20, ); } - return MatchTile( - onTap: () async { - Navigator.push( - context, - CupertinoPageRoute( - fullscreenDialog: true, - builder: (context) => MatchResultView( - match: matches[index], - onWinnerChanged: loadGames, + return Padding( + padding: const EdgeInsets.only(bottom: 12.0), + child: MatchTile( + onTap: () async { + Navigator.push( + context, + CupertinoPageRoute( + fullscreenDialog: true, + builder: (context) => MatchResultView( + match: matches[index], + onWinnerChanged: loadGames, + ), ), - ), - ); - }, - match: matches[index], + ); + }, + match: matches[index], + ), ); }, ), diff --git a/lib/presentation/widgets/tiles/match_tile.dart b/lib/presentation/widgets/tiles/match_tile.dart index 55d81c3..21e24c0 100644 --- a/lib/presentation/widgets/tiles/match_tile.dart +++ b/lib/presentation/widgets/tiles/match_tile.dart @@ -11,7 +11,12 @@ import 'package:intl/intl.dart'; /// - [match]: The match data to be displayed. /// - [onTap]: The callback invoked when the tile is tapped. class MatchTile extends StatefulWidget { - const MatchTile({super.key, required this.match, required this.onTap}); + const MatchTile({ + super.key, + required this.match, + required this.onTap, + this.width, + }); /// The match data to be displayed. final Match match; @@ -19,6 +24,8 @@ class MatchTile extends StatefulWidget { /// The callback invoked when the tile is tapped. final VoidCallback onTap; + final double? width; + @override State createState() => _MatchTileState(); } @@ -41,7 +48,8 @@ class _MatchTileState extends State { return GestureDetector( onTap: widget.onTap, child: Container( - margin: CustomTheme.tileMargin, + margin: EdgeInsets.zero, + width: widget.width, padding: const EdgeInsets.all(12), decoration: BoxDecoration( color: CustomTheme.boxColor, diff --git a/pubspec.yaml b/pubspec.yaml index e79ca17..993ef78 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: game_tracker description: "Game Tracking App for Card Games" publish_to: 'none' -version: 0.0.1+21 +version: 0.0.1+23 environment: sdk: ^3.8.1 @@ -9,11 +9,6 @@ environment: dependencies: flutter: sdk: flutter - material_symbols_icons: ^4.2815.1 - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.8 drift: ^2.27.0 drift_flutter: ^0.2.4 path_provider: ^2.1.5