- First try to keep your SwiperFlatList inside View Component & Style Should be flex:1.
- Double check what is your Data format & how you render inside Image.
Otherwise Please Share Full Source Code.
Your image data is not from the web, this is local data so use this code :
<Image style={{width, height: 300, backgroundColor:"#f0ffff",flex: 1 }} source={item.uri}/>
instead of
<Image style={{width, height: 300, backgroundColor:"#f0ffff",flex: 1 }} source={{uri:item.uri}}/>
also change data formate :
const img=[
{uri:'../../assets/image.png', key: '1'},
{uri:'../../assets/image.png', key: '2'},
{uri:'../../assets/image.png', key: '3'}
];
to
const img=[
{uri:require('../../assets/image.png'), key: '1'},
{uri:require('../../assets/image.png'), key: '2'},
{uri:require('../../assets/image.png'), key: '3'}
];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…