From 4aa1de0e498536d6185bca1ff80370230e900573 Mon Sep 17 00:00:00 2001 From: otbenjello Date: Wed, 13 Dec 2023 09:21:07 +0100 Subject: [PATCH] =?UTF-8?q?correction=20mise=20=C3=A0=20jour=20liste?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/view/home/prediction_view.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/view/home/prediction_view.dart b/lib/view/home/prediction_view.dart index f521ca3..400681e 100644 --- a/lib/view/home/prediction_view.dart +++ b/lib/view/home/prediction_view.dart @@ -51,20 +51,19 @@ class _PredictionState extends State { void prediction() async { InfoMessage tmp = InfoMessage(); setState(() { - print("lol"); - lastWorkoutArr[0]["Value"] = "null"; + lastWorkoutArr[0]["value"] = "null"; }); Tuple2 resultat = await Provider.of(context, listen: false) .predictActivity(DateTime.now(), selectedCategory, tmp); if (!resultat.item1) return; setState(() { - lastWorkoutArr[0]["Value"] = + lastWorkoutArr[0]["value"] = resultat.item2.timeOfActivity.toStringAsFixed(2); - lastWorkoutArr[1]["Value"] = resultat.item2.bpmAvg.toStringAsFixed(2); - lastWorkoutArr[2]["Value"] = + lastWorkoutArr[1]["value"] = resultat.item2.bpmAvg.toStringAsFixed(2); + lastWorkoutArr[2]["value"] = resultat.item2.vitesseAvg.toStringAsFixed(2); - lastWorkoutArr[3]["Value"] = resultat.item2.distance.toStringAsFixed(2); + lastWorkoutArr[3]["value"] = resultat.item2.distance.toStringAsFixed(2); }); } @@ -155,6 +154,7 @@ class _PredictionState extends State { title: "Valider", onPressed: () async { prediction(); + setState(() {}); }), const SizedBox(height: 20), ListView.builder(