writeString method

void writeString(
  1. int indent,
  2. String string
)

Implementation

void writeString(int indent, String string) {
  string = string
      .replaceAll("'", r"\'")
      .replaceAll('"', r'\"')
      .replaceAll(r'$', r'\$');
  buffer.write(
    "${_generateIndent(indent)}'$string'",
  );
}