fromPointer static method

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

Implementation

static Line? fromPointer(Pointer<Void> ptr, {bool needFree = true, bool takeOwnership = true})  {
    if (ptr == nullptr) {
      return null;
    }
    final result = LineImpl.fromNative(ptr.cast<LineNative>().ref, takeOwnership: takeOwnership);
    if (needFree) {
      malloc.free(ptr);
    }
    return result;
}