addCodec method
Add a codec to the registry
Implementation
void addCodec(String codecName, Codec codec) {
if (codecs[codecName] != null &&
codec.hashCode != codecs[codecName].hashCode) {
final alreadyStoredCodec = codecs[codecName];
throw Exception(
'Codec already exists for key: $codecName, new_codec: $codec ,already_stored_codec: $alreadyStoredCodec');
}
codecs[codecName] ??= codec;
}