This commit is contained in:
2025-08-02 15:13:33 +02:00
parent e1bc0c946f
commit bcc71b4539
3 changed files with 48 additions and 43 deletions

View File

@@ -12,26 +12,10 @@ class HomeView extends StatefulWidget {
class _HomeViewState extends State<HomeView> { class _HomeViewState extends State<HomeView> {
final gameData = <Map<String, String>>[ final gameData = <Map<String, String>>[
{ {'game': 'Cabo', 'group': 'Bananencrew', 'date': '01.08.2024'},
'game': 'Cabo', {'game': 'Quixx', 'group': 'Die Anhänger Jesu', 'date': '30.07.2024'},
'group': 'Bananencrew', {'game': '6 Nimmt', 'group': 'Säufer', 'date': '28.07.2024'},
'date': '01.08.2024', {'game': 'Uno', 'group': 'Grillraketen', 'date': '25.07.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 @override
@@ -54,11 +38,17 @@ class _HomeViewState extends State<HomeView> {
Row( Row(
children: [ children: [
Expanded( Expanded(
child: PrimaryOutlinedButton(text: "${gameData[0]['group']}", onPressed: () {}), child: PrimaryOutlinedButton(
text: "${gameData[0]['group']}",
onPressed: () {},
),
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Expanded( Expanded(
child: PrimaryOutlinedButton(text: "${gameData[1]['group']}", onPressed: () {}), child: PrimaryOutlinedButton(
text: "${gameData[1]['group']}",
onPressed: () {},
),
), ),
], ],
), ),
@@ -66,11 +56,17 @@ class _HomeViewState extends State<HomeView> {
Row( Row(
children: [ children: [
Expanded( Expanded(
child: PrimaryOutlinedButton(text: "${gameData[2]['group']}", onPressed: () {}), child: PrimaryOutlinedButton(
text: "${gameData[2]['group']}",
onPressed: () {},
),
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Expanded( Expanded(
child: PrimaryOutlinedButton(text: "${gameData[3]['group']}", onPressed: () {}), child: PrimaryOutlinedButton(
text: "${gameData[3]['group']}",
onPressed: () {},
),
), ),
], ],
), ),
@@ -89,11 +85,17 @@ class _HomeViewState extends State<HomeView> {
Row( Row(
children: [ children: [
Expanded( Expanded(
child: PrimaryOutlinedButton(text: "${gameData[0]['game']}", onPressed: () {}), child: PrimaryOutlinedButton(
text: "${gameData[0]['game']}",
onPressed: () {},
),
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Expanded( Expanded(
child: PrimaryOutlinedButton(text: "${gameData[1]['game']}", onPressed: () {}), child: PrimaryOutlinedButton(
text: "${gameData[1]['game']}",
onPressed: () {},
),
), ),
], ],
), ),
@@ -101,11 +103,17 @@ class _HomeViewState extends State<HomeView> {
Row( Row(
children: [ children: [
Expanded( Expanded(
child: PrimaryOutlinedButton(text: "${gameData[2]['game']}", onPressed: () {}), child: PrimaryOutlinedButton(
text: "${gameData[2]['game']}",
onPressed: () {},
),
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Expanded( Expanded(
child: PrimaryOutlinedButton(text: "${gameData[3]['game']}", onPressed: () {}), child: PrimaryOutlinedButton(
text: "${gameData[3]['game']}",
onPressed: () {},
),
), ),
], ],
), ),
@@ -120,7 +128,10 @@ class _HomeViewState extends State<HomeView> {
const SizedBox(height: 8), const SizedBox(height: 8),
PrimaryContainer( PrimaryContainer(
Center( Center(
child: PrimaryOutlinedButton(text: 'Jetzt vorschlagen', onPressed: () {}) child: PrimaryOutlinedButton(
text: 'Jetzt vorschlagen',
onPressed: () {},
),
), ),
), ),
], ],

View File

@@ -1,10 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:game_tracker/core/custom_theme.dart'; import 'package:game_tracker/core/custom_theme.dart';
Widget PrimaryOutlinedButton({ Widget PrimaryOutlinedButton({required String text, required onPressed}) {
required String text,
required onPressed,
}) {
return SizedBox( return SizedBox(
height: 65, height: 65,
child: OutlinedButton( child: OutlinedButton(
@@ -23,10 +20,7 @@ Widget PrimaryOutlinedButton({
softWrap: true, softWrap: true,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
maxLines: 2, maxLines: 2,
style: const TextStyle( style: const TextStyle(color: Colors.white, fontSize: 15),
color: Colors.white,
fontSize: 15,
),
), ),
), ),
), ),