I want to set up a card from react-native-elements, which has an Image and the title of the card. I want the image to take the whole of the width available in the view and adjust the height keeping the aspect ratio. So basically I have neither height nor width.
As I understand, the Image component requires height/width props. But setting it up won't make it responsive. I was trying few things with flex but it's not working
<Card>
<Image
style={{
flex: 1,
alignSelf: 'stretch',
width: null,
height: null
}}
resizeMode="contain"
source={{
uri: "url-of-the-image.png"
}}/>
<View>
<Text>Image Title</Text>
</View>
</Card>
Image is not showing up