Skip to content

Commit

Permalink
Change filteredExamTypes type
Browse files Browse the repository at this point in the history
  • Loading branch information
rubuy-74 committed Oct 20, 2023
1 parent 53da109 commit 6d10ab4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions uni/lib/view/exams/widgets/exam_filter_form.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'dart:collection';

import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:uni/generated/l10n.dart';
Expand All @@ -8,9 +10,10 @@ class ExamFilterForm extends StatefulWidget {
const ExamFilterForm(this.filteredExamsTypes, {super.key});
final Map<String, bool> filteredExamsTypes;

Map<String, bool> get filteredExamTypes =>
Map<String, bool>.from(filteredExamsTypes)
..removeWhere((key, value) => !Exam.types.containsKey(key));
UnmodifiableMapView<String,bool> get filteredExamTypes =>
UnmodifiableMapView(Map<String, bool>
.from(filteredExamsTypes)
..removeWhere((key, value) => !Exam.types.containsKey(key)),);

@override
ExamFilterFormState createState() => ExamFilterFormState();
Expand Down

0 comments on commit 6d10ab4

Please sign in to comment.