format
This commit is contained in:
@@ -11,27 +11,11 @@ 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: () {},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -128,4 +139,4 @@ class _HomeViewState extends State<HomeView> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,4 @@ Widget PrimaryContainer(Widget childWidget) {
|
|||||||
),
|
),
|
||||||
child: childWidget,
|
child: childWidget,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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(
|
||||||
@@ -20,15 +17,12 @@ Widget PrimaryOutlinedButton({
|
|||||||
child: Text(
|
child: Text(
|
||||||
text,
|
text,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
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,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user