$get<T> method

T $get<T>(
  1. Map<String, dynamic> map,
  2. String key, [
  3. MappingHooks? hooks
])

Implementation

T $get<T>(Map<String, dynamic> map, String key, [MappingHooks? hooks]) {
  return guard(
    MapperMethod.decode,
    '.$key',
    () => hooks.decode<T>(
      map[key],
      (v) => v == null
          ? throw MapperException.missingParameter(key)
          : fromValue<T>(v),
    ),
  );
}