inputNameToIndexAsync method

Future<int> inputNameToIndexAsync(
  1. String name
)

Implementation

Future<int> inputNameToIndexAsync(String name) async {
  final cName = name.toNativeUtf8().cast<ffi.Char>();
  final rval = await cvRunAsync<int>(
    (callback) => cdnn.Layer_InputNameToIndex_Async(ref, cName, callback),
    (c, p) {
      final rval = p.cast<ffi.Int>().value;
      calloc.free(p);
      return c.complete(rval);
    },
  );
  calloc.free(cName);

  return rval;
}