Modified match tile
This commit is contained in:
@@ -78,7 +78,9 @@ class _MatchViewState extends State<MatchView> {
|
||||
height: MediaQuery.paddingOf(context).bottom - 20,
|
||||
);
|
||||
}
|
||||
return MatchTile(
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(bottom: 12.0),
|
||||
child: MatchTile(
|
||||
onTap: () async {
|
||||
Navigator.push(
|
||||
context,
|
||||
@@ -92,6 +94,7 @@ class _MatchViewState extends State<MatchView> {
|
||||
);
|
||||
},
|
||||
match: matches[index],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -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<MatchTile> createState() => _MatchTileState();
|
||||
}
|
||||
@@ -41,7 +48,8 @@ class _MatchTileState extends State<MatchTile> {
|
||||
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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user