$enc<T> method

dynamic $enc<T>(
  1. T value,
  2. String key, [
  3. MappingHooks? hooks
])

Implementation

dynamic $enc<T>(T value, String key, [MappingHooks? hooks]) {
  return guard(
    MapperMethod.encode,
    '.$key',
    () => hooks.encode<T>(value, toValue),
  );
}