writeQ method Null safety

void writeQ(
  1. Object obj,
  2. {Punctuation delimiter = Punctuation.singleQuotationMark}
)

Encloses obj with delimiter and writes the resulting String to the buffer.

Implementation

void writeQ(
  Object obj, {
  Punctuation delimiter = Punctuation.singleQuotationMark,
}) {
  var string = '$obj';
  if (string.isEmpty) return;
  write(delimiter.value);
  write(string);
  write(delimiter.value);
}