fixed warnings (super.key, etc)

This commit is contained in:
Kima
2023-12-12 22:57:16 +01:00
parent fc3f538e6b
commit 6bac82f7d6
46 changed files with 349 additions and 228 deletions

View File

@@ -4,19 +4,24 @@ import 'package:filcnaplo_mobile_ui/pages/grades/grades_count_item.dart';
import 'package:collection/collection.dart';
class GradesCount extends StatelessWidget {
const GradesCount({Key? key, required this.grades}) : super(key: key);
const GradesCount({super.key, required this.grades});
final List<Grade> grades;
@override
Widget build(BuildContext context) {
List<int> gradesCount = List.generate(5, (int index) => grades.where((e) => e.value.value == index + 1).length);
List<int> gradesCount = List.generate(5,
(int index) => grades.where((e) => e.value.value == index + 1).length);
return Padding(
padding: const EdgeInsets.only(bottom: 6.0, top: 6.0, left: 12.0, right: 6.0),
padding:
const EdgeInsets.only(bottom: 6.0, top: 6.0, left: 12.0, right: 6.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: gradesCount.mapIndexed((index, e) => GradesCountItem(count: e, value: index + 1)).toList(),
children: gradesCount
.mapIndexed(
(index, e) => GradesCountItem(count: e, value: index + 1))
.toList(),
),
);
}