prettyPrintJson function

String prettyPrintJson(
  1. Object? json
)

Encodes json with indentation for easier debugging.

Implementation

String prettyPrintJson(Object? json) {
  const defaultIndent = '  ';
  const jsonIndent = JsonEncoder.withIndent(defaultIndent);
  return jsonIndent.convert(json);
}