Fix json readability and indention in debugOverview.dart for better debugging
This commit is contained in:
		@@ -1,4 +1,5 @@
 | 
			
		||||
 | 
			
		||||
import 'dart:convert';
 | 
			
		||||
import 'package:flutter/material.dart';
 | 
			
		||||
import 'package:jiffy/jiffy.dart';
 | 
			
		||||
import 'package:localstore/localstore.dart';
 | 
			
		||||
@@ -26,22 +27,16 @@ class _DebugOverviewState extends State<DebugOverview> {
 | 
			
		||||
      ),
 | 
			
		||||
      body: Column(
 | 
			
		||||
        children: [
 | 
			
		||||
          Expanded(
 | 
			
		||||
            flex: 1,
 | 
			
		||||
            child: ListView(
 | 
			
		||||
              children: [
 | 
			
		||||
                ListTile(
 | 
			
		||||
                  leading: const Icon(Icons.delete_forever),
 | 
			
		||||
                  title: const Text("Cache löschen"),
 | 
			
		||||
                  onTap: () {
 | 
			
		||||
                    storage.collection("MarianumMobile").delete().then((value) => {
 | 
			
		||||
                      Navigator.pop(context)
 | 
			
		||||
                    });
 | 
			
		||||
                  },
 | 
			
		||||
                )
 | 
			
		||||
              ],
 | 
			
		||||
            ),
 | 
			
		||||
          ListTile(
 | 
			
		||||
            leading: const Icon(Icons.delete_forever),
 | 
			
		||||
            title: const Text("Cache löschen"),
 | 
			
		||||
            onTap: () {
 | 
			
		||||
              storage.collection("MarianumMobile").delete().then((value) => {
 | 
			
		||||
                Navigator.pop(context)
 | 
			
		||||
              });
 | 
			
		||||
            },
 | 
			
		||||
          ),
 | 
			
		||||
 | 
			
		||||
          const Divider(),
 | 
			
		||||
          FutureBuilder(
 | 
			
		||||
            future: files,
 | 
			
		||||
@@ -62,11 +57,11 @@ class _DebugOverviewState extends State<DebugOverview> {
 | 
			
		||||
 | 
			
		||||
                      return ListTile(
 | 
			
		||||
                        leading: const Icon(Icons.text_snippet_outlined),
 | 
			
		||||
                        title: Text("(${getValue(index).toString().length} z) [$filename] ${Jiffy.unixFromMillisecondsSinceEpoch(getValue(index)['lastupdate']).fromNow()}"),
 | 
			
		||||
                        title: Text("[$filename]\n(${getValue(index).toString().length} zeichen) ${Jiffy.unixFromMillisecondsSinceEpoch(getValue(index)['lastupdate']).fromNow()}"),
 | 
			
		||||
                        textColor: Colors.black,
 | 
			
		||||
                        onTap: () {
 | 
			
		||||
                          Navigator.push(context, MaterialPageRoute(builder: (context) {
 | 
			
		||||
                            return JsonViewer(title: filename, data: getValue(index));
 | 
			
		||||
                            return JsonViewer(title: filename, data: {"lastupdate": getValue(index)['lastupdate'], "json": jsonDecode(getValue(index)['json'])});
 | 
			
		||||
                          },));
 | 
			
		||||
                        },
 | 
			
		||||
                      );
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user