fromPointer static method

MasstransitWeight? fromPointer(
  1. Pointer<Void> ptr, {
  2. bool needFree = true,
})

Implementation

static MasstransitWeight? fromPointer(ffi.Pointer<ffi.Void> ptr,
    {core.bool needFree = true}) {
  if (ptr == ffi.nullptr) {
    return null;
  }
  final result = MasstransitWeightImpl.fromNative(
      ptr.cast<MasstransitWeightNative>().ref);

  if (needFree) {
    malloc.free(ptr);
  }
  return result;
}