flutter linting

This commit is contained in:
unknown
2022-01-05 13:02:22 +01:00
parent 79f6ef4c50
commit 339dbea1ef
26 changed files with 226 additions and 143 deletions

View File

@@ -6,14 +6,15 @@ class AverageHelper {
List<String> ignoreInFinal = ["5,SzorgalomErtek", "4,MagatartasErtek"];
if (finalAvg)
if (finalAvg) {
grades.removeWhere((e) =>
(e.value.value == 0) ||
(ignoreInFinal.contains(e.gradeType?.id)));
}
grades.forEach((e) {
for (var e in grades) {
average += e.value.value * ((finalAvg ? 100 : e.value.weight) / 100);
});
}
average = average /
grades

View File

@@ -1,3 +1,5 @@
// ignore_for_file: avoid_print
import 'dart:io';
import 'dart:typed_data';

View File

@@ -17,7 +17,7 @@ extension UpdateHelper on Release {
updateCallback!(-1, UpdateState.preparing);
String downloads = await StorageHelper.downloadsPath();
File apk = File("$downloads/filcnaplo-${version}.apk");
File apk = File("$downloads/filcnaplo-$version.apk");
if (!await apk.exists()) {
updateCallback(-1, UpdateState.downloading);
@@ -31,6 +31,7 @@ extension UpdateHelper on Release {
var result = await OpenFile.open(apk.path);
if (result.type != ResultType.done) {
// ignore: avoid_print
print("ERROR: installUpdate.openFile: " + result.message);
throw result.message;
}