From 414a1ad254429ec0246571f2d42051a09fad7654 Mon Sep 17 00:00:00 2001 From: checkedear <271323618+checkedear@users.noreply.github.com> Date: Tue, 9 Jun 2026 13:21:41 +0200 Subject: [PATCH] feat: remove class average widget if there is no data --- .../lib/ui/phone/pages/home/home_grades.dart | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/firka/lib/ui/phone/pages/home/home_grades.dart b/firka/lib/ui/phone/pages/home/home_grades.dart index ce645ec..9b9247d 100644 --- a/firka/lib/ui/phone/pages/home/home_grades.dart +++ b/firka/lib/ui/phone/pages/home/home_grades.dart @@ -257,17 +257,17 @@ class _HomeGradesScreen extends FirkaState { ), ], ), - FirkaCard( - left: [ - Text( - widget.data.l10n.class_avg, - style: appStyle.fonts.B_16SB.apply( - color: appStyle.colors.textPrimary, + if (classAverage != null) + FirkaCard( + left: [ + Text( + widget.data.l10n.class_avg, + style: appStyle.fonts.B_16SB.apply( + color: appStyle.colors.textPrimary, + ), ), - ), - ], - right: [ - if (classAverage != null) + ], + right: [ Container( width: 48, height: 26, @@ -289,8 +289,8 @@ class _HomeGradesScreen extends FirkaState { ), ), ), - ], - ), + ], + ), FirkaCard( left: [ Text(