MVP #141
@@ -2,7 +2,20 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:game_tracker/core/custom_theme.dart';
|
import 'package:game_tracker/core/custom_theme.dart';
|
||||||
|
|
||||||
class GameTile extends StatefulWidget {
|
class GameTile extends StatefulWidget {
|
||||||
const GameTile({super.key});
|
final String gameTitle;
|
||||||
|
final String gameType;
|
||||||
|
final String ruleset;
|
||||||
|
final String players;
|
||||||
|
final String winner;
|
||||||
|
|
||||||
|
const GameTile({
|
||||||
|
super.key,
|
||||||
|
required this.gameTitle,
|
||||||
|
required this.gameType,
|
||||||
|
required this.ruleset,
|
||||||
|
required this.players,
|
||||||
|
required this.winner,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<GameTile> createState() => _GameTileState();
|
State<GameTile> createState() => _GameTileState();
|
||||||
@@ -11,72 +24,67 @@ class GameTile extends StatefulWidget {
|
|||||||
class _GameTileState extends State<GameTile> {
|
class _GameTileState extends State<GameTile> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Column(
|
||||||
padding: const EdgeInsets.all(12),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
height: 120,
|
children: [
|
||||||
width: 250,
|
Row(
|
||||||
decoration: BoxDecoration(
|
children: [
|
||||||
borderRadius: BorderRadius.circular(12),
|
Text(
|
||||||
color: CustomTheme.boxColor,
|
widget.gameTitle,
|
||||||
border: Border.all(color: CustomTheme.boxBorder),
|
style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
child: Column(
|
const SizedBox(width: 5),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
Text(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
widget.gameType,
|
||||||
children: [
|
style: const TextStyle(fontSize: 14, color: Colors.grey),
|
||||||
const Row(
|
),
|
||||||
children: [
|
],
|
||||||
Text(
|
),
|
||||||
'Gametitle',
|
const SizedBox(height: 5),
|
||||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
Container(
|
||||||
),
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
SizedBox(width: 5),
|
height: 20,
|
||||||
Text(
|
decoration: BoxDecoration(
|
||||||
'Gametype',
|
borderRadius: BorderRadius.circular(4),
|
||||||
style: TextStyle(fontSize: 14, color: Colors.grey),
|
color: CustomTheme.primaryColor,
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
const SizedBox(height: 5),
|
child: Text(
|
||||||
Container(
|
widget.ruleset,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
heightFactor: 1.5,
|
||||||
|
child: Text(
|
||||||
|
widget.players,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Center(
|
||||||
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||||
height: 20,
|
width: 220,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(4),
|
borderRadius: BorderRadius.circular(4),
|
||||||
color: CustomTheme.primaryColor,
|
color: Colors.yellow.shade300,
|
||||||
),
|
),
|
||||||
child: const Text(
|
child: Row(
|
||||||
'Ruleset',
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
children: [
|
||||||
),
|
const Icon(Icons.emoji_events, color: Colors.black, size: 20),
|
||||||
),
|
Text(
|
||||||
const Center(
|
widget.winner,
|
||||||
child: Text(
|
textAlign: TextAlign.center,
|
||||||
'5 Player',
|
style: const TextStyle(
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
fontWeight: FontWeight.bold,
|
||||||
),
|
color: Colors.black87,
|
||||||
),
|
),
|
||||||
const Spacer(),
|
|
||||||
Center(
|
|
||||||
child: Container(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
|
||||||
width: 220,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4),
|
|
||||||
color: Colors.yellow.shade300,
|
|
||||||
),
|
|
||||||
child: const Text(
|
|
||||||
'In Progress',
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: TextStyle(
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Colors.black87,
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user