customEvent method

  1. @override
void customEvent(
  1. int cookie,
  2. String eventName,
  3. int paramCount, [
  4. String? p1,
  5. String? p2,
  6. String? p3,
  7. String? p4,
  8. String? p5,
  9. String? p6,
  10. String? p7,
  11. String? p8,
  12. String? p9,
  13. String? p10,
  14. String? p11,
  15. String? p12,
])
override

Implementation

@override
void customEvent(
  int cookie,
  String eventName,
  int paramCount, [
  String? p1,
  String? p2,
  String? p3,
  String? p4,
  String? p5,
  String? p6,
  String? p7,
  String? p8,
  String? p9,
  String? p10,
  String? p11,
  String? p12,
]) {
  final ptrEventName = eventName.toNativeUtf16();
  final ptrP1 = p1 != null ? p1.toNativeUtf16() : nullptr;
  final ptrP2 = p2 != null ? p2.toNativeUtf16() : nullptr;
  final ptrP3 = p3 != null ? p3.toNativeUtf16() : nullptr;
  final ptrP4 = p4 != null ? p4.toNativeUtf16() : nullptr;
  final ptrP5 = p5 != null ? p5.toNativeUtf16() : nullptr;
  final ptrP6 = p6 != null ? p6.toNativeUtf16() : nullptr;
  final ptrP7 = p7 != null ? p7.toNativeUtf16() : nullptr;
  final ptrP8 = p8 != null ? p8.toNativeUtf16() : nullptr;
  final ptrP9 = p9 != null ? p9.toNativeUtf16() : nullptr;
  final ptrP10 = p10 != null ? p10.toNativeUtf16() : nullptr;
  final ptrP11 = p11 != null ? p11.toNativeUtf16() : nullptr;
  final ptrP12 = p12 != null ? p12.toNativeUtf16() : nullptr;

  _api.invokeMethodVoidCustomEvent(
    handle,
    cookie,
    ptrEventName,
    paramCount,
    ptrP1,
    ptrP2,
    ptrP3,
    ptrP4,
    ptrP5,
    ptrP6,
    ptrP7,
    ptrP8,
    ptrP9,
    ptrP10,
    ptrP11,
    ptrP12,
  );

  malloc.free(ptrEventName);

  if (ptrP1 != nullptr) malloc.free(ptrP1);
  if (ptrP2 != nullptr) malloc.free(ptrP2);
  if (ptrP3 != nullptr) malloc.free(ptrP3);
  if (ptrP4 != nullptr) malloc.free(ptrP4);
  if (ptrP5 != nullptr) malloc.free(ptrP5);
  if (ptrP6 != nullptr) malloc.free(ptrP6);
  if (ptrP7 != nullptr) malloc.free(ptrP7);
  if (ptrP8 != nullptr) malloc.free(ptrP8);
  if (ptrP9 != nullptr) malloc.free(ptrP9);
  if (ptrP10 != nullptr) malloc.free(ptrP10);
  if (ptrP11 != nullptr) malloc.free(ptrP11);
  if (ptrP12 != nullptr) malloc.free(ptrP12);
}