decode method Null safety

  1. @override
void decode(
  1. KeyedArchive object
)
override

Implementation

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

  version = object.decode("openapi") ?? "3.0.0";
  info =
      object.decodeObject("info", () => APIInfo.empty()) ?? APIInfo.empty();
  servers =
      object.decodeObjects("servers", () => APIServerDescription.empty());
  paths = object.decodeObjectMap("paths", () => APIPath());
  components = object.decodeObject("components", () => APIComponents());
  security =
      object.decodeObjects("security", () => APISecurityRequirement.empty());
  tags = object.decodeObjects("tags", () => APITag.empty());
}