forked from firka/student-legacy
fixed another weird shit
This commit is contained in:
parent
56500406e5
commit
bcab128332
@ -109,21 +109,22 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
),
|
),
|
||||||
));
|
));
|
||||||
|
|
||||||
List<Widget> gradeTiles = [];
|
// ignore: no_leading_underscores_for_local_identifiers
|
||||||
|
List<Widget> _gradeTiles = [];
|
||||||
|
|
||||||
if (!gradeCalcMode) {
|
if (!gradeCalcMode) {
|
||||||
subjectGrades.sort((a, b) => -a.date.compareTo(b.date));
|
subjectGrades.sort((a, b) => -a.date.compareTo(b.date));
|
||||||
for (var grade in subjectGrades) {
|
for (var grade in subjectGrades) {
|
||||||
if (grade.type == GradeType.midYear) {
|
if (grade.type == GradeType.midYear) {
|
||||||
gradeTiles.add(GradeViewable(grade));
|
_gradeTiles.add(GradeViewable(grade));
|
||||||
} else {
|
} else {
|
||||||
gradeTiles.add(CertificationTile(grade, padding: EdgeInsets.zero));
|
_gradeTiles.add(CertificationTile(grade, padding: EdgeInsets.zero));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (subjectGrades.isNotEmpty) {
|
} else if (subjectGrades.isNotEmpty) {
|
||||||
subjectGrades.sort((a, b) => -a.date.compareTo(b.date));
|
subjectGrades.sort((a, b) => -a.date.compareTo(b.date));
|
||||||
for (var grade in subjectGrades) {
|
for (var grade in subjectGrades) {
|
||||||
gradeTiles.add(GradeTile(grade));
|
_gradeTiles.add(GradeTile(grade));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tiles.add(
|
tiles.add(
|
||||||
@ -141,14 +142,14 @@ class _GradeSubjectViewState extends State<GradeSubjectView> {
|
|||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: gradeTiles.isNotEmpty
|
child: _gradeTiles.isNotEmpty
|
||||||
? Panel(
|
? Panel(
|
||||||
key: ValueKey(gradeCalcMode),
|
key: ValueKey(gradeCalcMode),
|
||||||
title: Text(
|
title: Text(
|
||||||
gradeCalcMode ? "Ghost Grades".i18n : "Grades".i18n,
|
gradeCalcMode ? "Ghost Grades".i18n : "Grades".i18n,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: gradeTiles,
|
children: _gradeTiles,
|
||||||
))
|
))
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
),
|
),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user