I\'m trying to build a Flutter App and learning Dart in the process, but I\'m getting kind of frustrated when debugging. I have fetched a resource from an API and now I want
Use this method
JsonEncoder encoder = new JsonEncoder.withIndent(' ');
String prettyprint = encoder.convert(yourJsonString);
debugPrint(prettyprint);
But it works only with JSON strings, I have not idea about how to do with "normal" strings. The first thing I think is to add manually a \n after every n characters, for now, while waiting for a stable fix!