toJsonEncoded method

String toJsonEncoded({
  1. bool pretty = false,
})

Implementation

String toJsonEncoded({bool pretty = false}) {
  var j = toJson();
  if (pretty) {
    return JsonEncoder.withIndent('  ').convert(j);
  } else {
    return json.encode(j);
  }
}