Extended debugging & storageview
This commit is contained in:
parent
ff4566cf05
commit
b51928ecf1
8
.idea/libraries/Dart_Packages.xml
generated
8
.idea/libraries/Dart_Packages.xml
generated
@ -268,6 +268,13 @@
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="filesize">
|
||||
<value>
|
||||
<list>
|
||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dev/filesize-2.0.1/lib" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
<entry key="fixnum">
|
||||
<value>
|
||||
<list>
|
||||
@ -1038,6 +1045,7 @@
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/ffi-2.0.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/file-6.1.4/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/filesize-2.0.1/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/fixnum-1.1.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flowder-0.2.0/lib" />
|
||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dev/flutter_blurhash-0.7.0/lib" />
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
import 'dart:convert';
|
||||
import 'package:filesize/filesize.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:localstore/localstore.dart';
|
||||
import 'package:marianum_mobile/screen/settings/debug/jsonViewer.dart';
|
||||
@ -58,13 +60,35 @@ class _DebugOverviewState extends State<DebugOverview> {
|
||||
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.text_snippet_outlined),
|
||||
title: Text("[$filename]\n(${getValue(index).toString().length} zeichen) ${Jiffy.unixFromMillisecondsSinceEpoch(getValue(index)['lastupdate']).fromNow()}"),
|
||||
title: Text(filename),
|
||||
subtitle: Text("${filesize(getValue(index).toString().length * 8)}, ${Jiffy.unixFromMillisecondsSinceEpoch(getValue(index)['lastupdate']).fromNow()}"),
|
||||
trailing: Icon(Icons.chevron_right),
|
||||
textColor: Colors.black,
|
||||
onTap: () {
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) {
|
||||
return JsonViewer(title: filename, data: {"lastupdate": getValue(index)['lastupdate'], "json": jsonDecode(getValue(index)['json'])});
|
||||
},));
|
||||
},
|
||||
onLongPress: () {
|
||||
showDialog(context: context, builder: (context) {
|
||||
return SimpleDialog(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: Icon(Icons.delete_forever),
|
||||
title: Text("Diese Datei löschen"),
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.copy),
|
||||
title: Text("Dateitext kopieren"),
|
||||
onTap: () {
|
||||
Clipboard.setData(ClipboardData(text: getValue(index).toString()));
|
||||
Navigator.of(context).pop();
|
||||
},
|
||||
)
|
||||
],
|
||||
);
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
|
@ -58,6 +58,7 @@ dependencies:
|
||||
flowder: ^0.2.0
|
||||
url_launcher: ^6.1.10
|
||||
flutter_linkify: ^5.0.2
|
||||
filesize: ^2.0.1
|
||||
|
||||
dependency_overrides:
|
||||
xml: ^6.2.2
|
||||
|
Loading…
x
Reference in New Issue
Block a user