From 30ac155b4b3007aa26c81789b7a255cdcec0c561 Mon Sep 17 00:00:00 2001
From: 55nknown <annon@annon.me>
Date: Sun, 20 Nov 2022 20:18:58 +0100
Subject: [PATCH] grade value nocolor

---
 filcnaplo/lib/ui/widgets/grade/grade_tile.dart | 16 +++++++++-------
 filcnaplo/pubspec.yaml                         |  4 +++-
 filcnaplo_premium                              |  2 +-
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/filcnaplo/lib/ui/widgets/grade/grade_tile.dart b/filcnaplo/lib/ui/widgets/grade/grade_tile.dart
index fddc1c5..df8f8b4 100644
--- a/filcnaplo/lib/ui/widgets/grade/grade_tile.dart
+++ b/filcnaplo/lib/ui/widgets/grade/grade_tile.dart
@@ -129,6 +129,7 @@ class GradeValueWidget extends StatelessWidget {
     this.shadow = false,
     this.outline = false,
     this.complemented = false,
+    this.nocolor = false,
   }) : super(key: key);
 
   final GradeValue value;
@@ -138,13 +139,14 @@ class GradeValueWidget extends StatelessWidget {
   final bool shadow;
   final bool outline;
   final bool complemented;
+  final bool nocolor;
 
   @override
   Widget build(BuildContext context) {
     GradeValue value = Provider.of<SettingsProvider>(context).goodStudent ? GradeValue(5, "Példás", "Példás", this.value.weight) : this.value;
     bool isSubjectView = SubjectGradesContainer.of(context) != null;
 
-    Color color = gradeColor(context: context, value: value.value);
+    Color color = gradeColor(context: context, value: value.value, nocolor: nocolor);
     Widget valueText;
     final percentage = value.percentage;
 
@@ -166,7 +168,9 @@ class GradeValueWidget extends StatelessWidget {
         ),
         textAlign: TextAlign.center,
       );
-    } else if (value.value != 0) {
+    } else if (value.valueName.toLowerCase().specialChars() == 'nem irt') {
+      valueText = const Icon(FeatherIcons.slash);
+    } else {
       valueText = Stack(alignment: Alignment.topRight, children: [
         Transform.translate(
           offset: (value.weight >= 200) ? const Offset(2, 1.5) : Offset.zero,
@@ -196,10 +200,6 @@ class GradeValueWidget extends StatelessWidget {
             ),
           ),
       ]);
-    } else if (value.valueName.toLowerCase().specialChars() == 'nem irt') {
-      valueText = const Icon(FeatherIcons.slash);
-    } else {
-      valueText = const Icon(FeatherIcons.type);
     }
 
     return fill
@@ -223,7 +223,7 @@ class GradeValueWidget extends StatelessWidget {
   }
 }
 
-Color gradeColor({required BuildContext context, required num value}) {
+Color gradeColor({required BuildContext context, required num value, bool nocolor = false}) {
   int valueInt = 0;
 
   var settings = Provider.of<SettingsProvider>(context, listen: false);
@@ -236,6 +236,8 @@ Color gradeColor({required BuildContext context, required num value}) {
     }
   } catch (_) {}
 
+  if (nocolor) return AppColors.of(context).text;
+
   switch (valueInt) {
     case 5:
       return settings.gradeColors[4];
diff --git a/filcnaplo/pubspec.yaml b/filcnaplo/pubspec.yaml
index 55ddf79..c5a53d7 100644
--- a/filcnaplo/pubspec.yaml
+++ b/filcnaplo/pubspec.yaml
@@ -3,7 +3,7 @@ description: "Nem hivatalos e-napló alkalmazás az e-Kréta rendszerhez"
 homepage: https://filcnaplo.hu
 publish_to: "none"
 
-version: 3.3.4+168
+version: 3.4.0+169
 
 environment:
   sdk: ">=2.16.0-80.1.beta <3.0.0"
@@ -53,6 +53,8 @@ dependencies:
   lottie: ^1.4.3
   rive: ^0.9.1
   animated_background: ^2.0.0
+  dropdown_button2: ^1.8.9
+  home_widget: ^0.1.6
   flutter_expandable_fab:
     git:
       url: https://github.com/filc/flutter_expandable_fab
diff --git a/filcnaplo_premium b/filcnaplo_premium
index ea41ee1..fbe173d 160000
--- a/filcnaplo_premium
+++ b/filcnaplo_premium
@@ -1 +1 @@
-Subproject commit ea41ee168fc3b1cac9d3c760edc4e5fd7c391d1f
+Subproject commit fbe173d323a88d5860dcc93a26c7bc9e77d258cf