prettyPrintJson function

String prettyPrintJson(
  1. String jsonString
)

Implementation

String prettyPrintJson(String jsonString) {
    final jsonObject = jsonDecode(jsonString);
    const encoder = JsonEncoder.withIndent('  ');
    return encoder.convert(jsonObject);
  }