# addConverter<S, T> abstract method

void addConverter<S, T>(

1. Converter<S, T> converter, {
2. Class<S>? sourceType,
3. Class<T>? targetType,

})

Registers a simple Converter from one specific source type to one target type.

### 🔧 Example

    registry.addConverter(StringToIntConverter());

    registry.addConverter(StringToIntConverter(), sourceType: Class<String>(), targetType: Class<int>());

## Implementation

    void addConverter<S, T>(Converter<S, T> converter, {Class<S>? sourceType, Class<T>? targetType});