Added long press options to chatbubbles
This commit is contained in:
@ -24,4 +24,17 @@ class JsonViewer extends StatelessWidget {
|
||||
return prettyJson(jsonInput, indent: 2);
|
||||
//return jsonInput.replaceAllMapped(RegExp(r'[{,}]'), (match) => "${match.group(0)}\n ");
|
||||
}
|
||||
|
||||
static void asDialog(BuildContext context, Map<String, dynamic> dataMap) {
|
||||
showDialog(context: context, builder: (context) {
|
||||
return AlertDialog(
|
||||
scrollable: true,
|
||||
title: const Text("Rohdaten"),
|
||||
content: Text(JsonViewer.format(dataMap)),
|
||||
actions: [
|
||||
TextButton(onPressed: () => Navigator.of(context).pop(), child: const SingleChildScrollView(child: Text("Schließen")))
|
||||
],
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user