131 lines
4.2 KiB
Dart
131 lines
4.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:game_tracker/core/custom_theme.dart';
|
|
import 'package:game_tracker/presentation/widgets/primary_outlined_button.dart';
|
|
import 'package:game_tracker/presentation/widgets/primary_container.dart';
|
|
|
|
class HomeView extends StatefulWidget {
|
|
const HomeView({super.key});
|
|
|
|
@override
|
|
State<HomeView> createState() => _HomeViewState();
|
|
}
|
|
|
|
class _HomeViewState extends State<HomeView> {
|
|
final gameData = <Map<String, String>> [
|
|
{
|
|
'game': 'Cabo',
|
|
'group': 'Bananencrew',
|
|
'date': '01.08.2024',
|
|
},
|
|
{
|
|
'game': 'Quixx',
|
|
'group': 'Die Anhänger Jesu',
|
|
'date': '30.07.2024',
|
|
},
|
|
{
|
|
'game': '6 Nimmt',
|
|
'group': 'Säufer',
|
|
'date': '28.07.2024',
|
|
},
|
|
{
|
|
'game': 'Uno',
|
|
'group': 'Grillraketen',
|
|
'date': '25.07.2024',
|
|
},
|
|
];
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: CustomTheme.backgroundColor,
|
|
body: Padding(
|
|
padding: const EdgeInsets.all(16.0),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: [
|
|
const Text(
|
|
'Zuletzt verwendete Gruppen',
|
|
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
|
),
|
|
const SizedBox(height: 8),
|
|
PrimaryContainer(
|
|
Column(
|
|
children: [
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: PrimaryOutlinedButton(text: "${gameData[0]['group']}", onPressed: () {}),
|
|
),
|
|
const SizedBox(width: 8),
|
|
Expanded(
|
|
child: PrimaryOutlinedButton(text: "${gameData[1]['group']}", onPressed: () {}),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 8),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: PrimaryOutlinedButton(text: "${gameData[2]['group']}", onPressed: () {}),
|
|
),
|
|
const SizedBox(width: 8),
|
|
Expanded(
|
|
child: PrimaryOutlinedButton(text: "${gameData[3]['group']}", onPressed: () {}),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 24),
|
|
const Text(
|
|
'Zuletzt gespielte Spiele',
|
|
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
|
),
|
|
const SizedBox(height: 8),
|
|
PrimaryContainer(
|
|
Column(
|
|
children: [
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: PrimaryOutlinedButton(text: "${gameData[0]['game']}", onPressed: () {}),
|
|
),
|
|
const SizedBox(width: 8),
|
|
Expanded(
|
|
child: PrimaryOutlinedButton(text: "${gameData[1]['game']}", onPressed: () {}),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 8),
|
|
Row(
|
|
children: [
|
|
Expanded(
|
|
child: PrimaryOutlinedButton(text: "${gameData[2]['game']}", onPressed: () {}),
|
|
),
|
|
const SizedBox(width: 8),
|
|
Expanded(
|
|
child: PrimaryOutlinedButton(text: "${gameData[3]['game']}", onPressed: () {}),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
const SizedBox(height: 24),
|
|
const Text(
|
|
'Lieblingsspiel nicht gefunden?',
|
|
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
|
),
|
|
const SizedBox(height: 8),
|
|
PrimaryContainer(
|
|
Center(
|
|
child: PrimaryOutlinedButton(text: 'Jetzt vorschlagen', onPressed: () {})
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |