diff --git a/lib/android/config/statistics.dart b/lib/android/config/statistics.dart index 3bb8040..ba306da 100644 --- a/lib/android/config/statistics.dart +++ b/lib/android/config/statistics.dart @@ -82,7 +82,9 @@ class StatisticsService { Box box = Hive.box(reducedStatisticsBoxName); Iterable keys = newFood.keys; for(int i = 0; i < keys.length;i++){ - box.put(keys.elementAt(i), newFood[keys.elementAt(i)] ?? []); + List alreadyExisting = castDynamicToListFood(box.get(keys.elementAt(i))); + alreadyExisting.addAll(newFood[keys.elementAt(i)] as Iterable); + box.put(keys.elementAt(i), alreadyExisting); } }