问题描述
我对何时使用两个不同的数据集(图像和产品)有疑问。图像数据集包含产品图像的链接,而产品数据集包含有关产品的信息。这两个数据集都包含ID,这很不错,因为这是我可以识别出哪些图片与正确的产品信息相关的方式。
因此,我现在面临的问题是,以某种方式创建条件,以便在将信息发送到DetailsScreen时以正确的方式将数据集索引在一起。
return Column(
crossAxisAlignment: CrossAxisAlignment.start,children: <Widget>[
Categories(),Expanded(
child:ListView.builder(
itemCount: users.length,itemBuilder: (context,index) {
return Container(
padding: EdgeInsets.fromLTRB(10,10,0),height: 220,width: double.maxFinite,child: Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15.0)),elevation: 3,child: InkWell(
onTap: () {
Navigator.push(
context,MaterialPageRoute(
builder: (context) => DetailsScreen(
//Here I would like to extract images[users[index].ID] so that they have the same ID.
links: images[index],products: products[index],),);
},],);
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)