static Pointer<Void> toPointer(Line? val) { if (val == null) { return nullptr; } final result = malloc<LineNative>(); result.ref = toNative(val); return result.cast(); }