Added Nextcloud base
This commit is contained in:
21
lib/screen/settings/debug/jsonViewer.dart
Normal file
21
lib/screen/settings/debug/jsonViewer.dart
Normal file
@ -0,0 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class JsonViewer extends StatelessWidget {
|
||||
String title;
|
||||
String data;
|
||||
|
||||
JsonViewer({Key? key, required this.title, required this.data}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(title),
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
scrollDirection: Axis.vertical,
|
||||
child: Text(data.replaceAllMapped(RegExp(r'[{,}]'), (match) => "${match.group(0)}\n ")),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user