Open shivam0831 opened 3 years ago
Try something like this:
<View style={{ flex: 1 }}>
<CropView
sourceUrl={file.path}
style={{ flex: 1 }}
ref={ref}
aspectRatio={style.radio}
keepAspectRatio
onImageCrop={(res) => console.warn(res)}
/>
</View>
CropView not showing the image to be cropped only a blank screen is showing.
import { CropView } from 'react-native-image-crop-tools';
const [uri, setUri] = useState('https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885__480.jpg');
{uri !== undefined && <CropView sourceUrl={uri} style={{flex:1}} ref={cropViewRef} onImageCrop={(res) => console.warn(res)} keepAspectRatio aspectRatio={{ width: 16, height: 9 }} />}