decodeReturnValue function

dynamic decodeReturnValue(
  1. List<CType> types,
  2. BinaryBlob msg
)

Implementation

dynamic decodeReturnValue(List<CType> types, BinaryBlob msg) {
  final returnValues = IDL.decode(types, msg);
  switch (returnValues.length) {
    case 0:
      return null;
    case 1:
      return returnValues[0];
    default:
      return returnValues;
  }
}