encode method Null safety

void encode(
  1. KeyedArchive object
)
override

Implementation

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

  if (defaultValue == null) {
    throw new ArgumentError(
        "APIServerVariable must have non-null values for: 'defaultValue'.");
  }

  object.encode("enum", availableValues);
  object.encode("default", defaultValue);
  object.encode("description", description);
}