From 5936f38048f05c2dd737a8aab7e0a9d054fbffa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Carvalho?= Date: Mon, 23 Oct 2023 18:20:30 +0100 Subject: [PATCH] show fixed len grade --- lib/pages/Teacher/Classes/AstaGraphs.dart | 3 +-- lib/pages/Teacher/Classes/AstaSubGraph.dart | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/pages/Teacher/Classes/AstaGraphs.dart b/lib/pages/Teacher/Classes/AstaGraphs.dart index 86fb438..a2f2ea0 100644 --- a/lib/pages/Teacher/Classes/AstaGraphs.dart +++ b/lib/pages/Teacher/Classes/AstaGraphs.dart @@ -502,8 +502,7 @@ class _AstaGraphsState extends State { builder: (context) => AstaSubGraph( passedSummResult: - dt['Result'] - .toString(), + dt['Result'], passedSummDate: dt['Created'] as Timestamp, diff --git a/lib/pages/Teacher/Classes/AstaSubGraph.dart b/lib/pages/Teacher/Classes/AstaSubGraph.dart index f27f3e2..10c1668 100644 --- a/lib/pages/Teacher/Classes/AstaSubGraph.dart +++ b/lib/pages/Teacher/Classes/AstaSubGraph.dart @@ -14,7 +14,7 @@ import 'package:printing/printing.dart'; import 'AstaReport.dart'; class AstaSubGraph extends StatefulWidget { - final String passedSummResult; + final double passedSummResult; final Timestamp passedSummDate; final String passedSummName; final String passedSummDesc; @@ -247,7 +247,7 @@ class _AstaSubGraphState extends State { padding: EdgeInsets.all(14.0), child: Text( "${AppLocalizations.of(context)!.grade}: " + - widget.passedSummResult, + widget.passedSummResult.toStringAsFixed(2), style: TextStyle(fontSize: 20), ), ),