encode method

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

Implementation

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

  if (title == null || version == null) {
    throw ArgumentError(
      "APIInfo must have non-null values for: 'title', 'version'.",
    );
  }

  object.encode("title", title);
  object.encode("description", description);
  object.encode("version", version);
  object.encode("termsOfService", termsOfServiceURL);
  object.encodeObject("contact", contact);
  object.encodeObject("license", license);
}