From 4a0243d327288345317840afd3cac204d2bcc611 Mon Sep 17 00:00:00 2001 From: laiiihz Date: Thu, 21 Jan 2021 11:04:46 +0800 Subject: [PATCH] json encode --- lib/src/view/dio_response_view.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/src/view/dio_response_view.dart b/lib/src/view/dio_response_view.dart index 0a278ef..c5a6554 100644 --- a/lib/src/view/dio_response_view.dart +++ b/lib/src/view/dio_response_view.dart @@ -1,6 +1,9 @@ +import 'dart:convert'; + import 'package:dio/dio.dart'; import 'package:flutter/material.dart'; import 'package:flutter_highlight/flutter_highlight.dart'; +import 'package:flutter_highlight/themes/github.dart'; import 'package:power_logger/src/view/box_view.dart'; import 'package:power_logger/src/view/table_view.dart'; import 'package:power_logger/src/view/title_view.dart'; @@ -57,8 +60,9 @@ class _DioResponseViewState extends State { return BoxView( title: Text('Params'), child: HighlightView( - prettyJson(widget.data.data.toString()), + prettyJson(jsonEncode(widget.data.data)), language: 'json', + theme: githubTheme, ), ); }