decode method Null safety

void decode(
  1. KeyedArchive object
)
override

Implementation

void decode(KeyedArchive object) {
  super.decode(object);

  description = object.decode("description");
  content = object.decodeObjectMap("content", () => new APIMediaType())
      as Map<String, APIMediaType>?;
  headers = object.decodeObjectMap("headers", () => new APIHeader())
      as Map<String, APIHeader>?;
}