reworked developer tools with diagnostics, storage viewers and release-capable debug overlays

This commit is contained in:
2026-09-26 14:34:47 +02:00
parent 0f6c388940
commit e6f74ca6fe
18 changed files with 1330 additions and 239 deletions
+3 -12
View File
@@ -5,6 +5,8 @@ import 'dart:io';
import 'package:flutter/foundation.dart';
import 'package:path_provider/path_provider.dart';
import '../utils/directory_size.dart';
/// One cached response: the raw JSON payload and when it was stored.
class CacheEntry {
final String json;
@@ -140,18 +142,7 @@ class CacheStore {
}
/// Total size of all entries in bytes.
Future<int> totalSize() async {
try {
final dir = await _directory();
var sum = 0;
await for (final entity in dir.list()) {
if (entity is File) sum += await entity.length();
}
return sum;
} on Object {
return 0;
}
}
Future<int> totalSize() async => directorySize(await _directory());
/// Parses the stored file format; public for tests.
static CacheEntry? parse(String raw) {