loadAsync method

Future<bool> loadAsync(
  1. String name
)

Implementation

Future<bool> loadAsync(String name) async {
  final cname = name.toNativeUtf8().cast<ffi.Char>();
  final rval =
      cvRunAsync<bool>((callback) => cobjdetect.CascadeClassifier_Load_Async(ref, cname, callback), (c, p) {
    final rval = p.cast<ffi.Int>().value != 0;
    calloc.free(p);
    return c.complete(rval);
  });
  calloc.free(cname);

  return rval;
}