Updated game + ruleset display

This commit is contained in:
2026-04-21 20:06:33 +02:00
parent 86f2ba01e5
commit 68141a3da2

View File

@@ -79,26 +79,6 @@ class _MatchTileState extends State<MatchTile> {
], ],
), ),
const SizedBox(height: 4),
Container(
decoration: BoxDecoration(
color: CustomTheme.primaryColor,
borderRadius: BorderRadius.circular(8),
),
padding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8),
child: Text(
translateRulesetToString(match.game.ruleset, context),
style: const TextStyle(
fontSize: 12,
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
),
const SizedBox(height: 8),
if (group != null) ...[ if (group != null) ...[
Row( Row(
children: [ children: [
@@ -113,7 +93,7 @@ class _MatchTileState extends State<MatchTile> {
), ),
], ],
), ),
const SizedBox(height: 12), const SizedBox(height: 4),
] else if (widget.compact) ...[ ] else if (widget.compact) ...[
Row( Row(
children: [ children: [
@@ -128,9 +108,66 @@ class _MatchTileState extends State<MatchTile> {
), ),
], ],
), ),
const SizedBox(height: 12), const SizedBox(height: 6),
] else ...[
const SizedBox(height: 8),
], ],
// Game + Ruleset Badge
IntrinsicHeight(
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
// Game
Container(
decoration: BoxDecoration(
color: CustomTheme.primaryColor.withAlpha(200),
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(8),
bottomLeft: Radius.circular(8),
),
),
padding: const EdgeInsets.symmetric(
vertical: 4,
horizontal: 8,
),
child: Text(
match.game.name,
style: const TextStyle(
fontSize: 12,
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
),
// Ruleset
Container(
decoration: BoxDecoration(
color: CustomTheme.primaryColor.withAlpha(120),
borderRadius: const BorderRadius.only(
topRight: Radius.circular(8),
bottomRight: Radius.circular(8),
),
),
padding: const EdgeInsets.symmetric(
vertical: 4,
horizontal: 8,
),
child: Text(
translateRulesetToString(match.game.ruleset, context),
style: const TextStyle(
fontSize: 12,
color: Colors.white,
fontWeight: FontWeight.bold,
),
),
),
],
),
),
const SizedBox(height: 12),
if (match.mvp.isNotEmpty) ...[ if (match.mvp.isNotEmpty) ...[
Container( Container(
padding: const EdgeInsets.symmetric( padding: const EdgeInsets.symmetric(