Im using a flatlist in react native and my listitem is as follows:
<ListItem
roundAvatar
title={item.name}
subtitle={item.vicinity}
avatar={{
uri:
'https://lh3.googleusercontent.com/p/AF1QipNePpAvxLPZRcL9TbdEu_iX6XL6TZYkav7iPAYz=s1600-w400',
}}
containerStyle={{ borderBottomWidth: 0 }}
onPress={() => console.log('item: ', item)}
/>
My item variable represents the object(s) returned from a call to the Google Places API.
As you can see Ive put in a dummy value for the uri prop...but what I really want is the uri of the image belonging to that particular place pulled from Places api.
I know i need to call the Photos api with the photos.photo_reference value from Places api.....however how do I fetch the image uri and submit it as the value for my uri prop? Perhaps I should use a function for the uri prop that returns the image uri from Photos api?....documentation doesnt tell you how to get uri though.
Hope this makes sence! Thanks