encodeTo method
Encodes Composite of values.
Implementation
@override
void encodeTo(Map<String, dynamic> value, Output output) {
if (mappedCodec.isEmpty) {
return;
}
for (final entry in mappedCodec.entries) {
if (mappedCodec.containsKey(entry.key) == false) {
throw CompositeException(
'Codec not found for key: ${entry.key}, in mappedCodec: $mappedCodec');
}
final codec = entry.value;
codec.encodeTo(value[entry.key], output);
}
}