From 246d14151a84ae8b705f05a91193ff635c759903 Mon Sep 17 00:00:00 2001 From: Juan Gilsanz Polo Date: Sun, 28 Jan 2024 20:42:26 +0100 Subject: [PATCH] Fix home top items type --- lib/screens/home/top_items/top_items_section.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screens/home/top_items/top_items_section.dart b/lib/screens/home/top_items/top_items_section.dart index 5749f5d..708a3d0 100644 --- a/lib/screens/home/top_items/top_items_section.dart +++ b/lib/screens/home/top_items/top_items_section.dart @@ -92,9 +92,9 @@ class TopItemsSection extends StatelessWidget { final List> lineChartData = lineData(); final mapData = lineChartData.map((e) => e["value"]); - final List total = mapData.isNotEmpty + final double total = mapData.isNotEmpty ? mapData.reduce((a, b) => a + b) - : []; + : 0; return SizedBox( child: Column(