setParameter method Null safety

  1. @override
void setParameter(
  1. String name,
  2. String quotedValue
)
override

Adds a new or replaces and existing parameter name with the value quotedValue.

Implementation

@override
void setParameter(String name, String quotedValue) {
  name = name.toLowerCase();
  if (name == 'charset') {
    quotedValue = removeQuotes(quotedValue).toLowerCase();
    charset = quotedValue;
  } else if (name == 'boundary') {
    quotedValue = removeQuotes(quotedValue);
    boundary = quotedValue;
  } else if (name == 'format') {
    quotedValue = removeQuotes(quotedValue).toLowerCase();
    isFlowedFormat = (quotedValue == 'flowed');
  }
  super.setParameter(name, quotedValue);
}