I am using the library to save a screenshot of a view, whose height is not initially defined, as I am using padding and setting the height of the view using the onLayout method.
The problem is that the image saved has a white background color, which I want to remove.
<View
onLayout={(e) => {
setHeight(e.nativeEvent.layout.height);
}}
ref={contentRef}
style={{
height,
padding:16,
width: width-12,
backgroundColor: "darkblue",
borderRadius: 32,
}}
>
<Text style={{color:"white"}}>This is a test using padding</Text>
</View>
I am using the library to save a screenshot of a view, whose height is not initially defined, as I am using padding and setting the height of the view using the onLayout method.
The problem is that the image saved has a white background color, which I want to remove.
Expo Snack to reproduce the issue