calloc method

  1. @override
Pointer<SdlEvent> calloc()
override

Implementation

@override
Pointer<SdlEvent> calloc() {
  final pointer = ffi.calloc<SdlEvent>();
  pointer.ref.notification.type = type;
  pointer.ref.notification.reserved = reserved;
  pointer.ref.notification.timestamp = timestamp;
  pointer.ref.notification.which = which;
  if (actionId.isNotEmpty) {
    pointer.ref.notification.actionId = actionId.toNativeUtf8();
  }
  return pointer;
}