getMapFunction<TSrc, TDst> method
Finds a map function for TSrc
to TDst
Implementation
MapFunction<TSrc, TDst> getMapFunction<TSrc, TDst>() {
try {
return mapFunctions.firstWhere(
(element) => element.srcType == TSrc && element.dstType == TDst)
as MapFunction<TSrc, TDst>;
} catch (ex) {
throw Exception(
'Unable to find map for converting $TSrc to $TDst. Make sure you have setup a map for this.');
}
}