Fixed tileColor being visible in overflow

This commit is contained in:
Elias Müller 2023-05-30 18:56:46 +02:00
parent abacef3d8a
commit 6a3ca7803c

View File

@ -108,7 +108,8 @@ class _GradeAverageState extends State<GradeAverage> {
itemBuilder: (context, index) {
var grade = gradeSystem ? index + 1 : 14 - index + 1;
bool isThis(int e) => e == grade;
return ListTile(
return Material(
child: ListTile(
tileColor: grade.isEven ? Colors.transparent : Colors.transparent.withAlpha(50),
title: Center(
child: Row(
@ -137,6 +138,7 @@ class _GradeAverageState extends State<GradeAverage> {
),
),
trailing: Text("Anzahl: ${grades.where(isThis).length}"),
),
);
},
itemCount: gradeSystem ? 6 : 15,