Pretty JSON and extended Webuntis Error Handling

This commit is contained in:
2023-02-22 16:31:26 +01:00
parent 7cbae807e4
commit 4274393cd2
5 changed files with 47 additions and 14 deletions

View File

@ -59,16 +59,14 @@ class _DebugOverviewState extends State<DebugOverview> {
itemCount: files.length,
itemBuilder: (context, index) {
String filename = files[index].split("/").last;
//String data = getValue(index).toString().replaceAll("{", "{\n ").replaceAll("[", "[\n ").replaceAll(",", ",\n ");
String data = getValue(index).toString();
return ListTile(
leading: const Icon(Icons.text_snippet_outlined),
title: Text("(${data.length} z) [$filename] ${Jiffy.unixFromMillisecondsSinceEpoch(getValue(index)['lastupdate']).fromNow()}"),
title: Text("(${getValue(index).toString().length} z) [$filename] ${Jiffy.unixFromMillisecondsSinceEpoch(getValue(index)['lastupdate']).fromNow()}"),
textColor: Colors.black,
onTap: () {
Navigator.push(context, MaterialPageRoute(builder: (context) {
return JsonViewer(title: filename, data: data);
return JsonViewer(title: filename, data: getValue(index));
},));
},
);