flutter - 使用列表选项,在单个 ID 图像中用作滑块
问题描述
class QuotationResources {
final String price,vehicleShowcase,vehicleShowcaseLeft,vehicleShowcaseRight,vehicleShowcaseRear;
QuotationResources({
this.vehicleNumber,
this.vehicleShowcase,
this.vehicleShowcaseLeft,
this.vehicleShowcaseRight,
this.vehicleShowcaseRear,
this.price,
});
}
List<QuotationResources> quotationResources = [
QuotationResources(
id: 1,
vehicleShowcase: "assets/images/truck_1.jpeg",
vehicleShowcaseLeft: "assets/images/truck_2.jpg",
vehicleShowcaseRight: "assets/images/truck_3.jpg",
vehicleShowcaseRear: "assets/images/truck_4.jpeg" ),
];
基本上我只想滑块,如何使用 id=1 图像作为滑块(如 vehicleShowcase、vehicleShowcaseLeft、vehicleShowcaseRight、vehicleShowcaseRear),下面的图像我需要以这种格式添加
图片:AssetImage(quotationResources.vehicleShowcase),
解决方案
推荐阅读
- data-structures - 处理大型数组上的大量查询的数据结构
- python - Python Enthought Canopy Word Scrambler
- jquery - 当单击另一个 div 时,jquery 更改 div 的类和内联样式
- jquery - 未在隐藏输入值上调用的函数已更改 Jquery
- android - AppBarLayout 捕获键盘焦点
- android - 如何在没有现有 API 的情况下向我的 Android 应用程序添加新内容?
- laravel - Laravel 请求验证 - 可为空的图像
- django - 如何使用 DRF 与另一个没有外键的表建立关系
- javascript - 乐透发电机从最低到最高产生
- npm - Google Cloud Builds,如何加快应用程序的构建时间(npm 包)