Fektetett órarend hibás kiírás javítása
This commit is contained in:
parent
51297ddc09
commit
b9e9bef182
@ -87,7 +87,7 @@ class _FSTimetableState extends State<FSTimetable> {
|
|||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
padding: const EdgeInsets.symmetric(horizontal: 8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
"${index - 1}.",
|
"${index - 0}.",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@ -119,9 +119,6 @@ class _FSTimetableState extends State<FSTimetable> {
|
|||||||
|
|
||||||
if (lessons.isEmpty) continue;
|
if (lessons.isEmpty) continue;
|
||||||
|
|
||||||
int lsnIndx = int.tryParse(lessons.first.lessonIndex) ?? 1;
|
|
||||||
final dayOffset = lsnIndx == 0 ? 1 : lsnIndx;
|
|
||||||
|
|
||||||
if (index == 0 && dayIndex >= 0) {
|
if (index == 0 && dayIndex >= 0) {
|
||||||
columns.add(
|
columns.add(
|
||||||
SizedBox(
|
SizedBox(
|
||||||
@ -141,16 +138,10 @@ class _FSTimetableState extends State<FSTimetable> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
final lessonIndex = index - dayOffset;
|
|
||||||
|
|
||||||
Lesson? lsn = lessons.firstWhereOrNull(
|
Lesson? lsn = lessons.firstWhereOrNull(
|
||||||
(e) => e.lessonIndex == (index - 1).toString());
|
(e) => e.lessonIndex == index.toString());
|
||||||
|
|
||||||
if (lessonIndex < 0 ||
|
if (lsn == null) {
|
||||||
lessonIndex > lessons.length ||
|
|
||||||
(index == 1 && lsnIndx != 0) ||
|
|
||||||
(lsnIndx != 0 && lessonIndex - 1 == -1) ||
|
|
||||||
lsn == null) {
|
|
||||||
columns.add(SizedBox(width: colw));
|
columns.add(SizedBox(width: colw));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user