eventType method

String eventType()

Get event type

Implementation

String eventType() {
  var tmp0 = 0;
  tmp0 = _box.borrow();
  final tmp1 = _api._verificationEventEventType(
    tmp0,
  );
  final tmp3 = tmp1.arg0;
  final tmp4 = tmp1.arg1;
  final tmp5 = tmp1.arg2;
  if (tmp4 == 0) {
    print("returning empty string");
    return "";
  }
  final ffi.Pointer<ffi.Uint8> tmp3_ptr = ffi.Pointer.fromAddress(tmp3);
  List<int> tmp3_buf = [];
  final tmp3_precast = tmp3_ptr.cast<ffi.Uint8>();
  for (int i = 0; i < tmp4; i++) {
    int char = tmp3_precast.elementAt(i).value;
    tmp3_buf.add(char);
  }
  final tmp2 = utf8.decode(tmp3_buf, allowMalformed: true);
  if (tmp5 > 0) {
    final ffi.Pointer<ffi.Void> tmp3_0;
    tmp3_0 = ffi.Pointer.fromAddress(tmp3);
    _api.__deallocate(tmp3_0, tmp5 * 1, 1);
  }
  return tmp2;
}