fromPointer static method

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

Implementation

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

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