forked from firka/student-legacy
finished final summary style and fixed thingies
This commit is contained in:
parent
9314c613bc
commit
4068abdb95
@ -120,51 +120,82 @@ class _AllSumBodyState extends State<AllSumBody> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void getEverything() {
|
||||||
|
getGrades();
|
||||||
|
getHomework();
|
||||||
|
getSubjects();
|
||||||
|
getAbsences();
|
||||||
|
getDelays();
|
||||||
|
}
|
||||||
|
|
||||||
void generateTiles() {
|
void generateTiles() {
|
||||||
for (var i in things.values) {
|
for (var i in things.values) {
|
||||||
Widget w = Center(
|
Widget w = Column(
|
||||||
child: Column(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(i.values.toList()[1]),
|
Text(
|
||||||
Text(i.values.toList()[0]),
|
i.values.toList()[1].toString(),
|
||||||
],
|
style: const TextStyle(
|
||||||
|
fontWeight: FontWeight.w800,
|
||||||
|
fontSize: 36.0,
|
||||||
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
i.values.toList()[0],
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 18.0,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
if (i.values.toList()[0] == 'óra') {
|
// TODO: az orakat es a hazikat szarul keri le, de majd meg lesz csinalva
|
||||||
return; // amig nincs megoldva az osszes ora szamanak lekerese
|
|
||||||
}
|
|
||||||
if (firstSixTiles.length < 6) {
|
if (firstSixTiles.length < 6) {
|
||||||
firstSixTiles.add(w);
|
firstSixTiles.add(w);
|
||||||
} else {
|
} else if (lastSixTiles.length < 6) {
|
||||||
lastSixTiles.add(w);
|
lastSixTiles.add(w);
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
getEverything();
|
||||||
generateTiles();
|
generateTiles();
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
GridView.count(
|
const SizedBox(
|
||||||
|
height: 45,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 250,
|
||||||
|
child: GridView.count(
|
||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
mainAxisSpacing: 10,
|
mainAxisSpacing: 0,
|
||||||
crossAxisSpacing: 10,
|
crossAxisSpacing: 5,
|
||||||
children: firstSixTiles,
|
children: firstSixTiles,
|
||||||
),
|
),
|
||||||
const SizedBox(
|
|
||||||
height: 40,
|
|
||||||
),
|
),
|
||||||
GridView.count(
|
const SizedBox(
|
||||||
|
height: 30,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 250,
|
||||||
|
child: GridView.count(
|
||||||
crossAxisCount: 3,
|
crossAxisCount: 3,
|
||||||
mainAxisSpacing: 10,
|
mainAxisSpacing: 0,
|
||||||
crossAxisSpacing: 10,
|
crossAxisSpacing: 5,
|
||||||
children: lastSixTiles,
|
children: lastSixTiles,
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -105,6 +105,8 @@ class _SummaryScreenState extends State<SummaryScreen>
|
|||||||
Text(
|
Text(
|
||||||
'Jó éved volt, $firstName!',
|
'Jó éved volt, $firstName!',
|
||||||
textAlign: TextAlign.left,
|
textAlign: TextAlign.left,
|
||||||
|
maxLines: 2,
|
||||||
|
overflow: TextOverflow.fade,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.w900,
|
fontWeight: FontWeight.w900,
|
||||||
fontSize: 26.0,
|
fontSize: 26.0,
|
||||||
@ -118,7 +120,10 @@ class _SummaryScreenState extends State<SummaryScreen>
|
|||||||
? 'Nézzük a jegyeidet... 📖'
|
? 'Nézzük a jegyeidet... 📖'
|
||||||
: widget.currentPage == 'lessons'
|
: widget.currentPage == 'lessons'
|
||||||
? 'A kedvenced órád 💓'
|
? 'A kedvenced órád 💓'
|
||||||
|
: widget.currentPage == 'personality'
|
||||||
|
? 'A te személyiséged...'
|
||||||
: '',
|
: '',
|
||||||
|
overflow: TextOverflow.fade,
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
fontSize: 22.0,
|
fontSize: 22.0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user