Fektetett órarend: 0. óra és utolsó óra megjelenítése
This commit is contained in:
parent
b9e9bef182
commit
cf0dc50df5
@ -75,10 +75,10 @@ class _FSTimetableState extends State<FSTimetable> {
|
|||||||
body: ListView.builder(
|
body: ListView.builder(
|
||||||
physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 24.0),
|
padding: const EdgeInsets.symmetric(horizontal: 6.0, vertical: 24.0),
|
||||||
itemCount: maxLessonCount + 1,
|
itemCount: maxLessonCount + 2,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
List<Widget> columns = [];
|
List<Widget> columns = [];
|
||||||
for (int dayIndex = -1; dayIndex < days.length; dayIndex++) {
|
for (int dayIndex = -1; dayIndex < days.length; dayIndex++) {
|
||||||
if (dayIndex == -1) {
|
if (dayIndex == -1) {
|
||||||
if (index >= 1) {
|
if (index >= 1) {
|
||||||
columns.add(SizedBox(
|
columns.add(SizedBox(
|
||||||
@ -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 - 0}.",
|
"${index - 1}.",
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@ -120,6 +120,7 @@ class _FSTimetableState extends State<FSTimetable> {
|
|||||||
if (lessons.isEmpty) continue;
|
if (lessons.isEmpty) continue;
|
||||||
|
|
||||||
if (index == 0 && dayIndex >= 0) {
|
if (index == 0 && dayIndex >= 0) {
|
||||||
|
// if (index == 0 || dayIndex >=0) {
|
||||||
columns.add(
|
columns.add(
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: colw,
|
width: colw,
|
||||||
@ -139,7 +140,7 @@ class _FSTimetableState extends State<FSTimetable> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Lesson? lsn = lessons.firstWhereOrNull(
|
Lesson? lsn = lessons.firstWhereOrNull(
|
||||||
(e) => e.lessonIndex == index.toString());
|
(e) => e.lessonIndex == (index - 1).toString());
|
||||||
|
|
||||||
if (lsn == null) {
|
if (lsn == null) {
|
||||||
columns.add(SizedBox(width: colw));
|
columns.add(SizedBox(width: colw));
|
||||||
@ -250,4 +251,4 @@ class _FSTimetableState extends State<FSTimetable> {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user