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 == 'filename') {
    quotedValue = removeQuotes(quotedValue);
    filename = quotedValue;
  } else if (name == 'creation-date') {
    quotedValue = removeQuotes(quotedValue);
    creationDate = DateCodec.decodeDate(quotedValue);
  } else if (name == 'modification-date') {
    quotedValue = removeQuotes(quotedValue);
    modificationDate = DateCodec.decodeDate(quotedValue);
  } else if (name == 'read-date') {
    quotedValue = removeQuotes(quotedValue);
    readDate = DateCodec.decodeDate(quotedValue);
  } else if (name == 'size') {
    size = int.tryParse(quotedValue);
  }
  super.setParameter(name, quotedValue);
}