$checkedConvert<T> function

T $checkedConvert <T>(
  1. Map map,
  2. String key,
  3. T castFunc(
    1. Object
    )
)

Helper function used in generated code when JsonSerializableGenerator.checked is true.

Should not be used directly.

Implementation

T $checkedConvert<T>(Map map, String key, T Function(Object) castFunc) {
  try {
    return castFunc(map[key]);
  } on CheckedFromJsonException {
    rethrow;
  } catch (error, stack) {
    throw CheckedFromJsonException._(error, stack, map, key);
  }
}