getParser<TType> method

(TType Function(dynamic)?) getParser<TType>()

Implementation

TType Function(dynamic)? getParser<TType>() {
  final parserDoesNotExist = _typeHelpers.containsKey(TType) == false;
  if (parserDoesNotExist) {
    throw new PreflectorError(
        "No parser for type '$TType' has been registered in preflector");
  } else {
    return _typeHelpers[TType] as TType Function(dynamic)?;
  }
}