Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
FauconSpartiate committed Feb 15, 2023
1 parent 8c87563 commit e5ccf47
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
4 changes: 2 additions & 2 deletions lib/Calculations/calculation_object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ abstract class CalculationObject {
String processedName = "";
double coefficient = 1;
double? result;
double? get value1 => result;
double get value2 => getPreference<double>("total_grades");
double? get value1 => result != null ? coefficient * result! : null;
double get value2 => coefficient * getPreference<double>("total_grades");
}
7 changes: 0 additions & 7 deletions lib/Calculations/subject.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// Project imports:

// Project imports:
import '../Misc/storage.dart';
import 'calculation_object.dart';
import 'calculator.dart';
import 'manager.dart';
Expand All @@ -11,10 +8,6 @@ class Subject extends CalculationObject {
List<Subject> children = [];
List<Test> tests = [];

@override
double? get value1 => result != null ? coefficient * result! : null;
@override
double get value2 => coefficient * getPreference<double>("total_grades");
int bonus = 0;
bool isGroup = false;
bool isChild = false;
Expand Down
20 changes: 10 additions & 10 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "0c80aeab9bc807ab10022cd3b2f4cf2ecdf231949dc1ddd9442406a003f19201"
sha256: "569ddca58d535e601dd1584afa117710abc999d036c0cd2c51777fb257df78e8"
url: "https://pub.dev"
source: hosted
version: "52.0.0"
version: "53.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: cd8ee83568a77f3ae6b913a36093a1c9b1264e7cb7f834d9ddd2311dade9c1f4
sha256: "10927c4b7c7c88b1adbca278c3d5531db92e2f4b4abf04e2919a800af965f3f5"
url: "https://pub.dev"
source: hosted
version: "5.4.0"
version: "5.5.0"
animations:
dependency: "direct main"
description:
Expand All @@ -37,10 +37,10 @@ packages:
dependency: transitive
description:
name: args
sha256: "139d809800a412ebb26a3892da228b2d0ba36f0ef5d9a82166e5e52ec8d61611"
sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.4.0"
async:
dependency: transitive
description:
Expand Down Expand Up @@ -457,10 +457,10 @@ packages:
dependency: transitive
description:
name: path_provider_linux
sha256: ab0987bf95bc591da42dffb38c77398fc43309f0b9b894dcc5d6f40c4b26c379
sha256: "2e32f1640f07caef0d3cb993680f181c79e54a3827b997d5ee221490d131fbd9"
url: "https://pub.dev"
source: hosted
version: "2.1.7"
version: "2.1.8"
path_provider_platform_interface:
dependency: transitive
description:
Expand Down Expand Up @@ -766,10 +766,10 @@ packages:
dependency: transitive
description:
name: xdg_directories
sha256: bd512f03919aac5f1313eb8249f223bacf4927031bf60b02601f81f687689e86
sha256: ee1505df1426458f7f60aac270645098d318a8b4766d85fde75f76f2e21807d1
url: "https://pub.dev"
source: hosted
version: "0.2.0+3"
version: "1.0.0"
xml:
dependency: "direct main"
description:
Expand Down

0 comments on commit e5ccf47

Please sign in to comment.