encodeObjectMap<T extends Coding> method

void encodeObjectMap<T extends Coding>(
  1. String key,
  2. Map<String, T?>? value
)

Encodes map of Coding objects into this object for key.

This invokes Coding.encode on each value in value and adds the map of objects to this archive for the key key.

Implementation

void encodeObjectMap<T extends Coding>(String key, Map<String, T?>? value) {
  final object = KeyedArchive({});
  value!.forEach((k, v) {
    object[k] = _encodedObject(v);
  });

  _map![key] = object;
}