From 61b77cab8fd49bd915711c75451d8d810d0f691c Mon Sep 17 00:00:00 2001 From: Fabian Date: Tue, 16 Jan 2024 13:17:36 +0100 Subject: [PATCH] Home on large Screen (temp) --- frontend/lib/tabs/home_tab.dart | 101 ++++++++++++++++---------------- 1 file changed, 52 insertions(+), 49 deletions(-) diff --git a/frontend/lib/tabs/home_tab.dart b/frontend/lib/tabs/home_tab.dart index 57770449..2b51192c 100644 --- a/frontend/lib/tabs/home_tab.dart +++ b/frontend/lib/tabs/home_tab.dart @@ -57,62 +57,65 @@ class _HomeTabState extends State { return Scaffold( body: SafeArea( child: SingleChildScrollView( - child: Column( - children: [ - GridView.count( - crossAxisCount: 2, - crossAxisSpacing: 10, - shrinkWrap: true, + child: Center( + child: Container( + constraints: const BoxConstraints(maxWidth: 600), + child: Column( children: [ - MyCard( - title: 'Events', - cardColor: colors.surfaceVariant, - imageName: events), - MyCard( - title: 'Mensa', - cardColor: colors.surfaceVariant, - imageName: mensa), - MyCard( - title: 'LSF', - cardColor: colors.surfaceVariant, - imageName: calendar, + GridView.count( + crossAxisCount: 2, + crossAxisSpacing: 10, + shrinkWrap: true, + children: [ + MyCard( + title: 'Events', + cardColor: colors.surfaceVariant, + imageName: events), + MyCard( + title: 'Mensa', + cardColor: colors.surfaceVariant, + imageName: mensa), + MyCard( + title: 'LSF', + cardColor: colors.surfaceVariant, + imageName: calendar, + ), + MyCard( + title: 'Noten', + cardColor: colors.surfaceVariant, + imageName: analytics, + ), + ], ), - MyCard( - title: 'Noten', - cardColor: colors.surfaceVariant, - imageName: analytics, - ), - ], - ), - Container( - decoration: BoxDecoration( - color: colors.outlineVariant, - borderRadius: const BorderRadius.only( - topLeft: Radius.circular(20), - topRight: Radius.circular(20))), - width: screenWidth, - height: 200, - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - Row( + Container( + decoration: BoxDecoration( + color: colors.outlineVariant, + borderRadius: const BorderRadius.all(Radius.circular(20))), + width: screenWidth, + height: 200, + child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ - _buildColumn('Gegebene Feedbacks', '12'), - _buildColumn('Absolvierte Quizze', '55'), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _buildColumn('Gegebene Feedbacks', '12'), + _buildColumn('Absolvierte Quizze', '55'), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + _buildColumn('Ø Quiz-Position', '4'), + _buildColumn('Alle Feedbacks ', '1923'), + ], + ), ], ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - _buildColumn('Ø Quiz-Position', '4'), - _buildColumn('Alle Feedbacks ', '1923'), - ], - ), - ], - ), + ), + ], ), - ], + ), ), ), ),