claude refactorings, flutter best practices, platform dependent changes, general cleanup

This commit is contained in:
2026-05-06 11:58:50 +02:00
parent 4b1d4379a0
commit 72ebe6f7e7
278 changed files with 1804 additions and 1041 deletions
+4 -4
View File
@@ -1,13 +1,13 @@
import 'package:localstore/localstore.dart';
import '../api/requestCache.dart';
import '../api/request_cache.dart';
class DataCleaner {
static Future<void> cleanOldCache() async {
var cacheData = await Localstore.instance.collection(RequestCache.collection).get();
final cacheData = await Localstore.instance.collection(RequestCache.collection).get();
cacheData?.forEach((key, value) async {
var lastUpdate = DateTime.fromMillisecondsSinceEpoch(value['lastupdate']);
if(DateTime.now().subtract(const Duration(days: 200)).isAfter(lastUpdate)) {
final lastUpdate = DateTime.fromMillisecondsSinceEpoch(value['lastupdate'] as int);
if (DateTime.now().subtract(const Duration(days: 200)).isAfter(lastUpdate)) {
await Localstore.instance.collection(RequestCache.collection).doc(key.split('/').last).delete();
}
});