fix json pretty

master
小赖 4 years ago
parent 8915150d76
commit d9c728f310

@ -66,24 +66,14 @@ class _DioResponseViewState extends State<DioResponseView> {
} }
_buildData() { _buildData() {
if (widget.data.data is Map) return BoxView(
return BoxView( title: Text('Data'),
title: Text('Data'), child: HighlightView(
child: HighlightView( prettyJson(widget.data.data),
prettyJson(widget.data.data), language: 'json',
language: 'json', theme: atomOneLightTheme,
theme: atomOneLightTheme, ),
), );
);
else
return BoxView(
title: Text('Raw'),
child: HighlightView(
widget.data.data,
language: 'html',
theme: atomOneLightTheme,
),
);
} }
_buildRawData() { _buildRawData() {

Loading…
Cancel
Save