unregister method

ComponentCodec? unregister(
  1. String type
)

Removes the codec registered for type, returning it (null when absent). Documents carrying the type afterwards realize it as a lossless foreign placeholder, the same as any unknown type.

Implementation

ComponentCodec? unregister(String type) {
  final removed = _byType.remove(type);
  if (removed != null &&
      identical(_byComponentType[removed.componentType], removed)) {
    _byComponentType.remove(removed.componentType);
  }
  return removed;
}