renderField method Null safety

void renderField(
  1. String name,
  2. String? value,
  3. bool quote,
  4. StringBuffer buffer
)

Implementation

void renderField(
    String name, String? value, bool quote, StringBuffer buffer) {
  if (value == null) {
    return;
  }
  buffer.write('; ');
  buffer.write(name);
  buffer.write('=');
  if (quote) {
    buffer.write('"');
  }
  buffer.write(value);
  if (quote) {
    buffer.write('"');
  }
}