getPredictionCustom method

Future<List<Object?>?> getPredictionCustom(
  1. int arg_index,
  2. List<double?> arg_input,
  3. List<int?> arg_shape,
  4. String arg_dtype,
)

predicts abstract number input

Implementation

Future<List<Object?>?> getPredictionCustom(int arg_index, List<double?> arg_input, List<int?> arg_shape, String arg_dtype) async {
  final BasicMessageChannel<Object?> channel = BasicMessageChannel<Object?>(
      'dev.flutter.pigeon.pytorch_lite.ModelApi.getPredictionCustom', codec,
      binaryMessenger: _binaryMessenger);
  final List<Object?>? replyList =
      await channel.send(<Object?>[arg_index, arg_input, arg_shape, arg_dtype]) as List<Object?>?;
  if (replyList == null) {
    throw PlatformException(
      code: 'channel-error',
      message: 'Unable to establish connection on channel.',
    );
  } else if (replyList.length > 1) {
    throw PlatformException(
      code: replyList[0]! as String,
      message: replyList[1] as String?,
      details: replyList[2],
    );
  } else {
    return (replyList[0] as List<Object?>?);
  }
}