encode method Null safety

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

Implementation

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

  if (url == null) {
    throw ArgumentError(
      "APIServerDescription must have non-null values for: 'url'.",
    );
  }

  object.encode("url", url);
  object.encode("description", description);
  object.encodeObjectMap("variables", variables);
}