diff --git a/lib/presentation/views/main_menu/home_view.dart b/lib/presentation/views/main_menu/home_view.dart index 675d739..b27f223 100644 --- a/lib/presentation/views/main_menu/home_view.dart +++ b/lib/presentation/views/main_menu/home_view.dart @@ -11,27 +11,11 @@ class HomeView extends StatefulWidget { } class _HomeViewState extends State { - final gameData = > [ - { - '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', - }, + final gameData = >[ + {'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 @@ -54,11 +38,17 @@ class _HomeViewState extends State { Row( children: [ Expanded( - child: PrimaryOutlinedButton(text: "${gameData[0]['group']}", onPressed: () {}), + child: PrimaryOutlinedButton( + text: "${gameData[0]['group']}", + onPressed: () {}, + ), ), const SizedBox(width: 8), Expanded( - child: PrimaryOutlinedButton(text: "${gameData[1]['group']}", onPressed: () {}), + child: PrimaryOutlinedButton( + text: "${gameData[1]['group']}", + onPressed: () {}, + ), ), ], ), @@ -66,11 +56,17 @@ class _HomeViewState extends State { Row( children: [ Expanded( - child: PrimaryOutlinedButton(text: "${gameData[2]['group']}", onPressed: () {}), + child: PrimaryOutlinedButton( + text: "${gameData[2]['group']}", + onPressed: () {}, + ), ), const SizedBox(width: 8), Expanded( - child: PrimaryOutlinedButton(text: "${gameData[3]['group']}", onPressed: () {}), + child: PrimaryOutlinedButton( + text: "${gameData[3]['group']}", + onPressed: () {}, + ), ), ], ), @@ -89,11 +85,17 @@ class _HomeViewState extends State { Row( children: [ Expanded( - child: PrimaryOutlinedButton(text: "${gameData[0]['game']}", onPressed: () {}), + child: PrimaryOutlinedButton( + text: "${gameData[0]['game']}", + onPressed: () {}, + ), ), const SizedBox(width: 8), Expanded( - child: PrimaryOutlinedButton(text: "${gameData[1]['game']}", onPressed: () {}), + child: PrimaryOutlinedButton( + text: "${gameData[1]['game']}", + onPressed: () {}, + ), ), ], ), @@ -101,11 +103,17 @@ class _HomeViewState extends State { Row( children: [ Expanded( - child: PrimaryOutlinedButton(text: "${gameData[2]['game']}", onPressed: () {}), + child: PrimaryOutlinedButton( + text: "${gameData[2]['game']}", + onPressed: () {}, + ), ), const SizedBox(width: 8), Expanded( - child: PrimaryOutlinedButton(text: "${gameData[3]['game']}", onPressed: () {}), + child: PrimaryOutlinedButton( + text: "${gameData[3]['game']}", + onPressed: () {}, + ), ), ], ), @@ -120,7 +128,10 @@ class _HomeViewState extends State { const SizedBox(height: 8), PrimaryContainer( Center( - child: PrimaryOutlinedButton(text: 'Jetzt vorschlagen', onPressed: () {}) + child: PrimaryOutlinedButton( + text: 'Jetzt vorschlagen', + onPressed: () {}, + ), ), ), ], @@ -128,4 +139,4 @@ class _HomeViewState extends State { ), ); } -} \ No newline at end of file +} diff --git a/lib/presentation/widgets/primary_container.dart b/lib/presentation/widgets/primary_container.dart index 5af3a07..1ea4a66 100644 --- a/lib/presentation/widgets/primary_container.dart +++ b/lib/presentation/widgets/primary_container.dart @@ -10,4 +10,4 @@ Widget PrimaryContainer(Widget childWidget) { ), child: childWidget, ); -} \ No newline at end of file +} diff --git a/lib/presentation/widgets/primary_outlined_button.dart b/lib/presentation/widgets/primary_outlined_button.dart index 1c87b4a..13959aa 100644 --- a/lib/presentation/widgets/primary_outlined_button.dart +++ b/lib/presentation/widgets/primary_outlined_button.dart @@ -1,10 +1,7 @@ import 'package:flutter/material.dart'; import 'package:game_tracker/core/custom_theme.dart'; -Widget PrimaryOutlinedButton({ - required String text, - required onPressed, -}) { +Widget PrimaryOutlinedButton({required String text, required onPressed}) { return SizedBox( height: 65, child: OutlinedButton( @@ -20,15 +17,12 @@ Widget PrimaryOutlinedButton({ child: Text( text, textAlign: TextAlign.center, - softWrap: true, + softWrap: true, overflow: TextOverflow.ellipsis, - maxLines: 2, - style: const TextStyle( - color: Colors.white, - fontSize: 15, - ), + maxLines: 2, + style: const TextStyle(color: Colors.white, fontSize: 15), ), ), ), ); -} \ No newline at end of file +}