From 29a69b7fdeb831fc2ca9bb80e324effd9a6f0f0c Mon Sep 17 00:00:00 2001 From: Mirko Oleszuk Date: Mon, 2 Sep 2024 11:59:33 +0200 Subject: [PATCH] reverse history list to show latest at top --- lib/screens/history.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screens/history.dart b/lib/screens/history.dart index b423d1b..5573591 100644 --- a/lib/screens/history.dart +++ b/lib/screens/history.dart @@ -52,7 +52,7 @@ class _HistoryScreenState extends State { setState(() {}); - return widgetList; + return widgetList.reversed.toList(); } @override @@ -85,7 +85,7 @@ class _HistoryScreenState extends State { } void _deleteHistoryExceptLast30Days() { - while (_historyList.length > 31) { + while (_historyList.length > 30) { _historyList.removeAt(0); sharedPreferences.setStringList("history", _historyList); }